【发布时间】:2018-07-21 23:40:27
【问题描述】:
Nodejs v4.2.6, Npm v3.5.2
最近对 Windows 10 进行了系统重置,然后使用双启动安装了 Ubuntu。我对 Ubuntu 操作系统比较陌生,只知道足够的 Linux 命令来帮助我。当我在我的 VueJs 项目目录中运行 npm install 时,我得到了这个:
> grpc@1.9.0 install /home/george/code/bedal/portal.barcodexchange.com/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
/usr/bin/env: ‘node’: No such file or directory
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.3
npm ERR! Linux 4.10.0-28-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! grpc@1.9.0 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the grpc@1.9.0 install script 'node-pre-gyp install --fallback-to-build --library=static_library'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the grpc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs grpc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls grpc
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/george/code/bedal/portal.barcodexchange.com/npm-debug.log
尽管出现错误,但我尝试在同一目录中运行“npm run dev”,这就是我得到的:
> barcode_portal@1.0.0 dev /home/george/code/bedal/portal.barcodexchange.com
> node build/dev-server.js
sh: 1: node: not found
npm ERR! Linux 4.10.0-28-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "dev"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! barcode_portal@1.0.0 dev: `node build/dev-server.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the barcode_portal@1.0.0 dev script 'node build/dev-server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the barcode_portal package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build/dev-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs barcode_portal
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls barcode_portal
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/george/code/bedal/portal.barcodexchange.com/npm-debug.log
这是我的文件目录在 VueJs 项目中的样子:
.
.babelrc
config
.editorconfig
.eslintrc.js
.firebaserc
.gitignore
node_modules
package.json
README.md
.vscode
..
build
debug.log
.eslintignore
firebase.json
.git
index.html
npm-debug.log
.postcssrc.js
src
yarn.lock
请注意,该项目在 Windows 安装上运行良好,但现在我无法在 Ubuntu 上启动所有内容。非常感谢您的帮助,感谢您的宝贵时间。
【问题讨论】:
-
需要安装node.js
标签: ubuntu npm vue.js npm-install grpc