gulp導入でハマったときの対処メモ
gulpのインストール時
インストールは下記のコマンドで
qiita.rb
$ sudo npm install gulp-sass --save-dev
下のようなエラーが出ていた
qiita.rb
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/***/.nodebrew/node/v9.4.0/lib/node_modules/gulp-sass/node_modules/node-sass/build'
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/Users/***/.nodebrew/node/v9.4.0/bin/node" "/Users/***/.nodebrew/node/v9.4.0/lib/node_modules/gulp-sass/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/***/.nodebrew/node/v9.4.0/lib/node_modules/gulp-sass/node_modules/node-sass
gyp ERR! node -v v9.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.7.2 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.7.2 postinstall 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! /Users/***/.npm/_logs/2018-01-12T09_08_16_651Z-debug.log
下記コマンドを打つことで解消
quiita.rb
sudo npm config set user 0
$ sudo npm config set unsafe-perm true
Author And Source
この問題について(gulp導入でハマったときの対処メモ), 我々は、より多くの情報をここで見つけました https://qiita.com/caycepapa/items/1e0e31b6f37a52e01f58著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .