安装node-sass失败
来源:3-15 错误处理及效果演示

小风又满楼
2020-05-18
已经使用sudo授权了,安装的时候还会提示权限问题
> node-sass@4.14.1 postinstall /Users/linxz/VueProjects/hybreid-web/node_modules/node-sass
> node scripts/build.js
Building: /usr/local/bin/node /Users/linxz/VueProjects/hybreid-web/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/node',
gyp verb cli '/Users/linxz/VueProjects/hybreid-web/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using node-gyp@3.8.0
gyp info using node@10.16.0 | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import sys; print "2.7.16
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 10.16.0
gyp verb command install [ '10.16.0' ]
gyp verb install input version string "10.16.0"
gyp verb install installing version: 10.16.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 10.16.0
gyp verb build dir attempting to create "build" dir: /Users/linxz/VueProjects/hybreid-web/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/linxz/VueProjects/hybreid-web/node_modules/node-sass/build'
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/usr/local/bin/node" "/Users/linxz/VueProjects/hybreid-web/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/linxz/VueProjects/hybreid-web/node_modules/node-sass
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
写回答
2回答
-
你好
可以尝试下使用cnpm安装012020-05-19 -
qq_流年_170
2020-05-19
用cnpm装就可以了
012020-05-19
相似问题