1. 程式人生 > >Error: Cannot find module 'gulp-sass'

Error: Cannot find module 'gulp-sass'

HR body controls ack all pil AC date res

運行gulp報錯

module.js:339 throw err;

Error: Cannot find module ‘gulp-sass‘

at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Applications/XAMPP/xamppfiles/htdocs/flyscoot.com/gulpfile.js:2:12)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
解決需要兩步:

1.npm update

2.npm install gulp-sass --save-dev in your root folder

---------------gulp-------------

//全局gulp

npm install gulp -g

//項目裏通過package.json安裝指定模塊

npm install

Error: Cannot find module 'gulp-sass'