“ meteor run”命令显示无法解析节点模块的错误

时间:2019-06-29 09:35:33

标签: angular angular-meteor

“流星运行”命令显示无法解决节点模块错误。

我正在尝试将现有的angular 7项目迁移到流星。后端位于节点js中,前端位于7号角。运行命令“ meteor”时,出现以下错误。我也尝试过运行流星npm install --save @ angular / service-worker。还是一样。这个问题的解决方案?

Unable to resolve some modules:
[0] 
[0]   "@angular/service-worker/build/webpack" in /media/shamla/New
[0] Volume/sheeba/Meteor/DexifyJune24/node_modules/@angular/cli/models/webpack-configs/production.js
[0] (web.browser)
[0] 
[0] If you notice problems related to these missing modules, consider running:
[0] 
[0]   meteor npm install --save @angular/service-worker
[0] 
[0] [client]: HTML Files Compilation: 35.373ms
[0] [client]: SCSS Files Compilation: 0.056ms
[0] 
[0] Unable to resolve some modules:
[0] 
[0]   "@angular/service-worker/build/webpack" in /media/shamla/New
[0] Volume/sheeba/Meteor/DexifyJune24/node_modules/@angular/cli/models/webpack-configs/production.js
[0] (web.browser.legacy)
[0] 
[0] If you notice problems related to these missing modules, consider running:
[0] 
[0]   meteor npm install --save @angular/service-worker
[0] 
[0] [server]: HTML Files Compilation: 25.860ms
[0] [server]: SCSS Files Compilation: 0.039ms
[0] /home/shamla/.meteor/packages/meteor-tool/.1.8.1.ani1yi.p0f9s++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:218
[0]       throw error;
[0]       ^
[0] 
[0] SyntaxError: Unexpected token . in JSON at position 0
[0]     at JSON.parse (<anonymous>)
[0]     at BabelCompiler.BCp._inferFromPackageJson (packages/babel-compiler.js:318:33)
[0]     at BabelCompiler.BCp.inferExtraBabelOptions (packages/babel-compiler.js:277:10)
[0]     at BabelCompiler.BCp.processOneFileForTarget (packages/babel-compiler.js:196:10)
[0]     at packages/babel-compiler.js:122:25
[0]     at /home/shamla/.meteor/packages/meteor-tool/.1.8.1.ani1yi.p0f9s++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40
[0]  => awaited here:
[0]     at Promise.await (/home/shamla/.meteor/packages/meteor-tool/.1.8.1.ani1yi.p0f9s++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:60:12)
[0]     at JsOutputResource.finalize (/tools/isobuild/compiler-plugin.js:897:7)
[0]     at JsOutputResource.hasPendingErrors (/tools/isobuild/compiler-plugin.js:924:10)
[0]     at JsOutputResource.reportPendingErrors (/tools/isobuild/compiler-plugin.js:929:14)
[0]     at ImportScanner._scanFile (/tools/isobuild/import-scanner.js:849:14)
[0]     at outputFiles.forEach.file (/tools/isobuild/import-scanner.js:529:14)
[0]     at Array.forEach (<anonymous>)
[0]     at ImportScanner.scanImports (/tools/isobuild/import-scanner.js:527:22)
[0]     at sourceBatches.forEach.batch (/tools/isobuild/compiler-plugin.js:1301:17)
[0]     at Array.forEach (<anonymous>)
[0]     at Function.computeJsOutputFilesMap (/tools/isobuild/compiler-plugin.js:1269:19)
[0]     at ServerTarget._emitResources (/tools/isobuild/bundler.js:1129:8)
[0]     at buildmessage.enterJob (/tools/isobuild/bundler.js:855:12)
[0]     at Object.enterJob (/tools/utils/buildmessage.js:388:12)
[0]     at ServerTarget.make (/tools/isobuild/bundler.js:843:18)
[0]     at /tools/isobuild/bundler.js:3199:14
[0]     at /tools/isobuild/bundler.js:3332:24
[0]     at Object.capture (/tools/utils/buildmessage.js:283:5)
[0]     at bundle (/tools/isobuild/bundler.js:3156:31)
[0]     at files.withCache (/tools/isobuild/bundler.js:3101:32)
[0]     at Object.withCache (/tools/fs/files.js:1744:12)
[0]     at Object.bundle (/tools/isobuild/bundler.js:3101:16)
[0]     at Profile.run (/tools/runners/run-app.js:572:24)
[0]     at Function.run (/tools/tool-env/profile.js:490:12)
[0]     at bundleApp (/tools/runners/run-app.js:571:34)
[0]     at AppRunner._runOnce (/tools/runners/run-app.js:613:35)
[0]     at AppRunner._fiber (/tools/runners/run-app.js:922:28)
[0]     at /tools/runners/run-app.js:401:12
[0] npm ERR! code ELIFECYCLE
[0] npm ERR! errno 1
[0] npm ERR! wallet-frontend@0.0.0 start: `meteor run`
[0] npm ERR! Exit status 1
[0] npm ERR! 
[0] npm ERR! Failed at the wallet-frontend@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[0] 
[0] npm ERR! A complete log of this run can be found in:
[0] npm ERR!     /home/shamla/.npm/_logs/2019-06-29T08_57_52_943Z-debug.log

0 个答案:

没有答案