node-sass模块在我的package.json中描述为devDepedencies
部分。
但是当我运行npm run prod时,我得到一个错误
Error: Cannot find module 'sass'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (/home/dev/www/trackremont/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at implementation (/home/dev/www/trackremont/node_modules/laravel-mix/src/components/Sass.js:52:39)
at implementation (/home/dev/www/trackremont/node_modules/laravel-mix/src/components/Preprocessor.js:125:61)
at global.tap (/home/dev/www/trackremont/node_modules/laravel-mix/src/helpers.js:10:5)
at Sass.loaderOptions (/home/dev/www/trackremont/node_modules/laravel-mix/src/components/Preprocessor.js:123:9)
...
npm ERR! @ production: `cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ production script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
试图执行清洁命令
rm -rf node_modules &&
rm package-lock.json
npm cache verify
npm cache clear --force &&
npm run prod
但错误仍然存在
请帮忙。