我知道这个问题已经被问到了,但是我认为我的问题不同于已经问到的问题中的问题。
这是npm install命令的输出
这是“ /root/.npm/_logs/2018-07-12T14_14_35_726Z-debug.log”文件
3304 silly saveTree | | | | +-- pify@2.3.0
3304 silly saveTree | | | | `-- strip-bom@3.0.0
3304 silly saveTree | | | `-- path-type@2.0.0
3304 silly saveTree | | +-- which-module@2.0.0
3304 silly saveTree | | `-- yargs-parser@7.0.0
3304 silly saveTree | `-- yargs@8.0.2
3304 silly saveTree +-- lodash@4.17.10
3304 silly saveTree +-- popper.js@1.14.3
3304 silly saveTree `-- vue@2.5.16
3305 warn ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
3306 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
3307 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
3308 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
3308 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
3308 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
3308 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
3309 verbose stack Error: node-sass@4.9.2 postinstall: `node scripts/build.js`
3309 verbose stack Exit status 1
3309 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
3309 verbose stack at emitTwo (events.js:126:13)
3309 verbose stack at EventEmitter.emit (events.js:214:7)
3309 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
3309 verbose stack at emitTwo (events.js:126:13)
3309 verbose stack at ChildProcess.emit (events.js:214:7)
3309 verbose stack at maybeClose (internal/child_process.js:925:16)
3309 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
3310 verbose pkgid node-sass@4.9.2
3311 verbose cwd /home/amarjit/Documents/localhost/laraveys
3312 verbose Linux 4.15.0-23-generic
3313 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
3314 verbose node v8.11.3
3315 verbose npm v6.1.0
3316 error code ELIFECYCLE
3317 error errno 1
3318 error node-sass@4.9.2 postinstall: `node scripts/build.js`
3318 error Exit status 1
3319 error Failed at the node-sass@4.9.2 postinstall script.
3319 error This is probably not a problem with npm. There is likely additional logging output above.
3320 verbose exit [ 1, true ]
答案 0 :(得分:1)
我找到了一个解决方案,我认为问题是关于node_modules目录中所有文件的权限。所以我就跑了
setEditing
答案 1 :(得分:0)
对我来说,它正在安装nodejs-legacy。输入node -v
,如果返回错误:
apt install nodejs-legacy
应该做到这一点。编码愉快!