【已解决】Laravel gulp报错ENOENT: no such file or directory, scandir ‘/home/vagrant/Code/TaskManager/node_modules/node-sass/vendor’

报错:

[15:38:53] Using gulpfile ~/Code/TaskManager/gulpfile.js
[15:38:53] Starting 'default'...
[15:38:53] Starting 'sass'...
[15:38:53] 'sass' errored after 78 ms
[15:38:53] Error: ENOENT: no such file or directory, scandir '/home/vagrant/Code/TaskManager/node_modules/node-sass/vendor'
    at Error (native)
    at Object.fs.readdirSync (fs.js:856:18)
    at Object.getInstalledBinaries (/home/vagrant/Code/TaskManager/node_modules/node-sass/lib/extensions.js:121:13)
    at foundBinariesList (/home/vagrant/Code/TaskManager/node_modules/node-sass/lib/errors.js:20:15)
    at foundBinaries (/home/vagrant/Code/TaskManager/node_modules/node-sass/lib/errors.js:15:5)
    at Object.module.exports.missingBinary (/home/vagrant/Code/TaskManager/node_modules/node-sass/lib/errors.js:45:5)
    at module.exports (/home/vagrant/Code/TaskManager/node_modules/node-sass/lib/binding.js:15:30)
    at Object.<anonymous> (/home/vagrant/Code/TaskManager/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
[15:38:53] Error in plugin 'run-sequence(sass)'
Message:
    ENOENT: no such file or directory, scandir '/home/vagrant/Code/TaskManager/node_modules/node-sass/vendor'
Details:
    errno: -2
    code: ENOENT
    syscall: scandir
    path: /home/vagrant/Code/TaskManager/node_modules/node-sass/vendor
Stack:
Error: ENOENT: no such file or directory, scandir '/home/vagrant/Code/TaskManager/node_modules/node-sass/vendor'
    at Error (native)
    at Object.fs.readdirSync (fs.js:856:18)
    at Object.getInstalledBinaries (/home/vagrant/Code/TaskManager/node_modules/node-sass/lib/extensions.js:121:13)
    at foundBinariesList (/home/vagrant/Code/TaskManager/node_modules/node-sass/lib/errors.js:20:15)
    at foundBinaries (/home/vagrant/Code/TaskManager/node_modules/node-sass/lib/errors.js:15:5)
    at Object.module.exports.missingBinary (/home/vagrant/Code/TaskManager/node_modules/node-sass/lib/errors.js:45:5)
    at module.exports (/home/vagrant/Code/TaskManager/node_modules/node-sass/lib/binding.js:15:30)
    at Object.<anonymous> (/home/vagrant/Code/TaskManager/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
[15:38:53] Finished 'default' after 98 ms

解决办法:

npm rebuild node-sass

文章的脚注信息由WordPress的wp-posturl插件自动生成



|2|left
打赏

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: