安装MM2时报错

RaspiSQH 120.5m2019-11-082185 次点击
执行npm install && npm start一句时,过一会就会报错。控制台输出如下:
root@raspberrypi:~/MagicMirror# npm install && npm start
npm WARN deprecated @types/vfile-message@2.0.0: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed.

> electron-chromedriver@1.8.0 install /root/MagicMirror/node_modules/electron-chromedriver
> node ./download-chromedriver.js

internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module '/root/MagicMirror/node_modules/electron-chromedriver/download-chromedriver.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron-chromedriver@1.8.0 install: `node ./download-chromedriver.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-chromedriver@1.8.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-11-08T09_18_22_420Z-debug.log
root@raspberrypi:~/MagicMirror# npm install && npm start
npm WARN deprecated @types/vfile-message@2.0.0: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed.

> electron-chromedriver@1.8.0 install /root/MagicMirror/node_modules/electron-chromedriver
> node ./download-chromedriver.js

internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module '/root/MagicMirror/node_modules/electron-chromedriver/download-chromedriver.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
npm WARN acorn-jsx@5.0.2 requires a peer of acorn@^6.0.0 || ^7.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron-chromedriver@1.8.0 install: `node ./download-chromedriver.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-chromedriver@1.8.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-11-08T09_20_04_185Z-debug.log
root@raspberrypi:~/MagicMirror#
收藏 ♥ 感谢
RaspiSQH 120.5m 2019-11-08 
log最后异常部分:

1498 silly saveTree ├─┬ time-grunt@2.0.0
1498 silly saveTree │ ├─┬ date-time@1.1.0
1498 silly saveTree │ │ └── time-zone@0.1.0
1498 silly saveTree │ ├── figures@1.7.0
1498 silly saveTree │ └─┬ pretty-ms@2.1.0
1498 silly saveTree │ ├── parse-ms@1.0.1
1498 silly saveTree │ └── plur@1.0.0
1498 silly saveTree └── valid-url@1.0.9
1499 warn acorn-jsx@5.0.2 requires a peer of acorn@^6.0.0 || ^7.0.0 but none is installed. You must install peer dependencies yourself.
1500 verbose stack Error: electron-chromedriver@1.8.0 install: `node ./download-chromedriver.js`
1500 verbose stack Exit status 1
1500 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
1500 verbose stack at EventEmitter.emit (events.js:198:13)
1500 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
1500 verbose stack at ChildProcess.emit (events.js:198:13)
1500 verbose stack at maybeClose (internal/child_process.js:982:16)
1500 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
1501 verbose pkgid electron-chromedriver@1.8.0
1502 verbose cwd /root/MagicMirror
1503 verbose Linux 4.14.79-v7+
1504 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
1505 verbose node v10.17.0
1506 verbose npm v6.11.3
1507 error code ELIFECYCLE
1508 error errno 1
1509 error electron-chromedriver@1.8.0 install: `node ./download-chromedriver.js`
1509 error Exit status 1
1510 error Failed at the electron-chromedriver@1.8.0 install script.
1510 error This is probably not a problem with npm. There is likely additional logging output above.
1511 verbose exit [ 1, true ]
RaspiSQH 120.5m 2019-11-08 
用百度上:
npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
仍然会报那个错。
RaspiSQH 120.5m 2019-11-08  ♥ 1
已解决:不加sudo即可....

登录注册 后可回复。

这里由以下店铺的技术人员在此免费提供能力范围内的技术支持。

NXEZ 创客商店(淘宝)

排障问题发帖注意事项:
1、请尽可能将故障说明清晰,列明例如使用环境和做了哪些操作和配置等。
2、排障中已经做了哪些尝试,如果能在问题中进行描述将极大提高解决问题的效率。
3、对于需要自身完成知识积累才能解决的问题,请自行通过搜索引擎寻找资料学习。