无法运行命令:npm run prod

时间:2018-10-28 01:18:39

标签: node.js npm

我是新来的,我刚刚在社区中注册。原因是要寻求您的帮助,我是一个新手,他试图解决向我提出的这个问题。

我已经按照these instructions安装了nodejs最新版本。问题出在执行命令:“ npm run prod”时。它显示了此错误消息。

值得一提的是,我使用Plesk作为平台。 Nodejs的安装,我是通过SSH完成的。

root@550:/home/mysite.com/httpdocs# npm run prod

> @ prod /home/mysite.com/httpdocs
> npm run production


> @ production /home/mysite.com/httpdocs
> cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: spawn node_modules/webpack/bin/webpack.js ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:362:16)
    at _combinedTickCallback (internal/process/next_tick.js:139:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)
    at Function.Module.runMain (module.js:696:11)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ production: `cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ production 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/2018-10-26T22_39_09_784Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ prod: `npm run production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ prod 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/2018-10-26T22_39_09_822Z-debug.log
root@550:/home/mysite.com/httpdocs#

对不起,如果我的英语不好,我正在使用Google翻译。

最好的问候!

0 个答案:

没有答案
相关问题