Webpack 在为node.js构建Azure SDK时,如何避免网页包错误

Webpack 在为node.js构建Azure SDK时,如何避免网页包错误,webpack,Webpack,我正在为node.js使用Azure SDK 当我使用webpack构建时,有没有关于如何避免所有这些错误的建议 谢谢 ERROR in ./~/tough-cookie/package.json Module parse failed: C:\Users\blah\devel\nextshot\node_modules\tough-cookie\package.json Line 2: Unexpected toke n : You may need an appropriate loader

我正在为node.js使用Azure SDK

当我使用webpack构建时,有没有关于如何避免所有这些错误的建议

谢谢

ERROR in ./~/tough-cookie/package.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\tough-cookie\package.json Line 2: Unexpected toke
n :
You may need an appropriate loader to handle this file type.
| {
|   "_args": [
|     [
|       "tough-cookie@~2.2.0",
 @ ./~/tough-cookie/lib/cookie.js 38:14-40

ERROR in ./~/ms-rest/~/mime-db/db.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\ms-rest\node_modules\mime-db\db.json Line 2: Unex
pected token :
You may need an appropriate loader to handle this file type.
| {
|   "application/1d-interleaved-parityfec": {
|     "source": "iana"
|   },
 @ ./~/ms-rest/~/mime-db/index.js 11:17-37

ERROR in ./~/mime-db/db.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\mime-db\db.json Line 2: Unexpected token :
You may need an appropriate loader to handle this file type.
| {
|   "application/1d-interleaved-parityfec": {
|     "source": "iana"
|   },
 @ ./~/mime-db/index.js 11:17-37

ERROR in ./~/har-validator/lib/schemas/cache.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\cache.json Line 2: Unex
pected token :
You may need an appropriate loader to handle this file type.
| {
|   "properties": {
|     "beforeRequest": {
|       "$ref": "#cacheEntry"
 @ ./~/har-validator/lib/schemas/index.js 4:9-32

ERROR in ./~/har-validator/lib/schemas/cacheEntry.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\cacheEntry.json Line 2:
 Unexpected token :
You may need an appropriate loader to handle this file type.
| {
|   "oneOf": [{
|     "type": "object",
|     "optional": true,
 @ ./~/har-validator/lib/schemas/index.js 5:14-42

ERROR in ./~/har-validator/lib/schemas/content.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\content.json Line 2: Un
expected token :
You may need an appropriate loader to handle this file type.
| {
|   "type": "object",
|   "required": [
|     "size",
 @ ./~/har-validator/lib/schemas/index.js 6:11-36

ERROR in ./~/har-validator/lib/schemas/entry.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\entry.json Line 2: Unex
pected token :
You may need an appropriate loader to handle this file type.
| {
|   "type": "object",
|   "optional": true,
|   "required": [
 @ ./~/har-validator/lib/schemas/index.js 9:9-32

ERROR in ./~/har-validator/lib/schemas/cookie.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\cookie.json Line 2: Une
xpected token :
You may need an appropriate loader to handle this file type.
| {
|   "type": "object",
|   "required": [
|     "name",
 @ ./~/har-validator/lib/schemas/index.js 7:10-34

ERROR in ./~/har-validator/lib/schemas/page.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\page.json Line 2: Unexp
ected token :
You may need an appropriate loader to handle this file type.
| {
|   "type": "object",
|   "optional": true,
|   "required": [
 @ ./~/har-validator/lib/schemas/index.js 12:8-30

ERROR in ./~/har-validator/lib/schemas/creator.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\creator.json Line 2: Un
expected token :
You may need an appropriate loader to handle this file type.
| {
|   "type": "object",
|   "required": [
|     "name",
 @ ./~/har-validator/lib/schemas/index.js 8:11-36

ERROR in ./~/har-validator/lib/schemas/log.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\log.json Line 2: Unexpe
cted token :
You may need an appropriate loader to handle this file type.
| {
|   "type": "object",
|   "required": [
|     "version",
 @ ./~/har-validator/lib/schemas/index.js 11:7-28

ERROR in ./~/har-validator/lib/schemas/pageTimings.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\pageTimings.json Line 2
: Unexpected token :
You may need an appropriate loader to handle this file type.
| {
|   "type": "object",
|   "properties": {
|     "onContentLoad": {
 @ ./~/har-validator/lib/schemas/index.js 13:15-44

ERROR in ./~/har-validator/lib/schemas/postData.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\postData.json Line 2: U
nexpected token :
You may need an appropriate loader to handle this file type.
| {
|   "type": "object",
|   "optional": true,
|   "required": [
 @ ./~/har-validator/lib/schemas/index.js 14:12-38

ERROR in ./~/har-validator/lib/schemas/record.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\record.json Line 2: Une
xpected token :
You may need an appropriate loader to handle this file type.
| {
|   "type": "object",
|   "required": [
|     "name",
 @ ./~/har-validator/lib/schemas/index.js 15:10-34

ERROR in ./~/har-validator/lib/schemas/response.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\response.json Line 2: U
nexpected token :
You may need an appropriate loader to handle this file type.
| {
|   "type": "object",
|   "required": [
|     "status",
 @ ./~/har-validator/lib/schemas/index.js 17:12-38

ERROR in ./~/har-validator/lib/schemas/har.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\har.json Line 2: Unexpe
cted token :
You may need an appropriate loader to handle this file type.
| {
|   "type": "object",
|   "required": [
|     "log"
 @ ./~/har-validator/lib/schemas/index.js 10:7-28

ERROR in ./~/har-validator/lib/schemas/request.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\request.json Line 2: Un
expected token :
You may need an appropriate loader to handle this file type.
| {
|   "type": "object",
|   "required": [
|     "method",
 @ ./~/har-validator/lib/schemas/index.js 16:11-36

ERROR in ./~/har-validator/lib/schemas/timings.json
Module parse failed: C:\Users\blah\devel\nextshot\node_modules\har-validator\lib\schemas\timings.json Line 2: Un
expected token :
You may need an appropriate loader to handle this file type.
| {
|   "required": [
|     "send",
|     "wait",
 @ ./~/har-validator/lib/schemas/index.js 18:11-36

您好,我很高兴能得到帮助,但您的问题对于在node、js和webpack中使用Azure SDK并不清楚。你想做什么?您是如何发现这个问题的?显然,您的网页包配置中需要一个文件加载器来处理.json文件hi,我很乐意提供帮助,但您的问题不清楚,是否要将Azure SDK用于node、js和网页包。你想做什么?你是如何得到这个问题的?显然,你需要在你的网页配置中有一个文件加载器来处理.json文件