【发布时间】:2019-04-16 15:46:42
【问题描述】:
12915 warn whisper-chat-example@1.0.0 No repository field.
12916 warn The package web3 is included as both a dev and production dependency.
12917 verbose type ProcessTerminatedError
12918 verbose stack ProcessTerminatedError: cancel after 1 retries!
12918 verbose stack at Farm.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js:87:25)
12918 verbose stack at Array.forEach (<anonymous>)
12918 verbose stack at Farm.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js:81:36)
12918 verbose stack at ontimeout (timers.js:427:11)
12918 verbose stack at tryOnTimeout (timers.js:289:5)
12918 verbose stack at listOnTimeout (timers.js:252:5)
12918 verbose stack at Timer.processTimers (timers.js:212:10)
12919 verbose cwd /Users/ishansrivastava/Desktop/blocks/Decentralized_Chat
12920 verbose Darwin 18.0.0
12921 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
12922 verbose node v10.1.0
12923 verbose npm v6.0.1
12924 error cancel after 1 retries!
12925 verbose exit [ 1, true ]
我不明白出了什么问题。我该如何解决这个问题?是否与 同时包含在开发和生产依赖项中这一行有关?
在运行 npm run dev 时,我得到:
sh: cross-env: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! whisper-chat-example@1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --hot`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the whisper-chat-example@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
【问题讨论】:
-
cross-dev似乎是一个需要全局安装的 npm 包,但事实并非如此。在运行npm run dev之前尝试npm i cross-env -g。
标签: javascript node.js npm npm-install package.json