11
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gulp導入でハマったときの対処メモ

Last updated at Posted at 2018-01-12

#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
11
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?