Can';在数字海洋的ubuntu服务器上运行npm运行构建

Can';在数字海洋的ubuntu服务器上运行npm运行构建,ubuntu,permissions,npm,webpack,babeljs,Ubuntu,Permissions,Npm,Webpack,Babeljs,在我的ubuntu服务器上,作为用户“user”,我运行了npm安装,然后运行了npm运行构建 我得到的以下错误是 sh: 1: better-npm-run: not found 使用npm安装better npm后,我会运行better npm。我得到以下输出,如下所示。虽然我不明白为什么我首先需要这样做,因为它在我的package.json中,我已经运行了npm install running better-npm-run in /home/user/website-prod Execu

在我的ubuntu服务器上,作为用户“user”,我运行了npm安装,然后运行了npm运行构建

我得到的以下错误是

sh: 1: better-npm-run: not found
使用
npm安装better npm后,我会运行better npm
。我得到以下输出,如下所示。虽然我不明白为什么我首先需要这样做,因为它在我的package.json中,我已经运行了
npm install

running better-npm-run in /home/user/website-prod
Executing script: build

to be executed: webpack --verbose --colors --display-error-details --config webpack/prod.config.js 
module.js:341
    throw err;
    ^

Error: Cannot find module './babel-transpiled-modules/plugin/plugin'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (/home/user/website-prod/node_modules/webpack-isomorphic-tools/plugin.js:1:80)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
运行更好的npm磨合/主页/用户/网站产品
执行脚本:构建
要执行的:webpack--verbose--colors--display error details--config webpack/prod.config.js
module.js:341
犯错误;
^
错误:找不到模块“”/babel transpiled模块/plugin/plugin'
在Function.Module.\u解析文件名(Module.js:339:15)
在Function.Module.\u加载(Module.js:290:25)
at Module.require(Module.js:367:17)
根据需要(内部/module.js:16:19)
反对。(/home/user/website prod/node_modules/webpack isomorphic tools/plugin.js:1:80)
在模块处编译(Module.js:413:34)
在Object.Module._extensions..js(Module.js:422:10)
在Module.load(Module.js:357:32)
在Function.Module.\u加载(Module.js:314:12)
at Module.require(Module.js:367:17)
同时,如果我使用ssh作为服务器的根用户,那么npm运行构建工作非常好。无需运行
npm,我更好地运行npm
。我怀疑我遇到了一个错误,因为我是非root用户,无法访问从
npm install
安装的node_模块


如果有人能帮我,那就太好了

当您运行
/node\u modules/.bin/better npm
时,它是否起作用。。。似乎在我的应用程序本地的node_modules中的.bin文件夹中找不到它。您是否在
/home/user/website prod
中运行了
npm i better npm run
(其中应该有一个
package.json
?(不要在root中运行它)我又运行了一次,但它不在那里。还有其他包,但没有更好的npm run