mall-master启动报错
[root@docker1 mall-master]# cnpm run dev > mxshop-admin@1.0.0 dev > webpack-dev-server --inline --progress --config build/webpack.dev.conf.js 94% asset optimization ERROR Failed to compile with 11 errors 上午5:38:06 error in ./src/styles/index.scss Module build failed: Error: `sass-loader` requires `node-sass` >=4. Please install a compatible version. at Object.sassLoader (/app/bobby/mall-master/node_modules/sass-loader/lib/loader.js:31:19) @ ./src/styles/index.scss 4:14-203 13:3-17:5 14:22-211 @ ./src/main.js @ multi (webpack)-dev-server/client?http://localhost:8090 webpack/hot/dev-server ./src/main.js error in ./src/views/pms/brand/index.vue Module build failed: Error: `sass-loader` requires `node-sass` >=4. Please install a compatible version. at Object.sassLoader (/app/bobby/mall-master/node_modules/sass-loader/lib/loader.js:31:19) @ ./node_modules/vue-style-loader!./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-38981627","scoped":true,"hasInlineConfig":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/views/pms/brand/index.vue 4:14-396 13:3-17:5 14:22-404 @ ./src/views/pms/brand/index.vue @ ./src/router/index.js @ ./src/main.js @ multi (webpack)-dev-server/client?http://localhost:8090 webpack/hot/dev-server ./src/main.js error in ./src/views/pms/productAttr/productAttrList.vue Module build failed: Error: `sass-loader` requires `node-sass` >=4. Please install a compatible version. at Object.sassLoader (/app/bobby/mall-master/node_modules/sass-loader/lib/loader.js:31:19) @ ./node_modules/vue-style-loader!./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-96c89de8","scoped":true,"hasInlineConfig":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/views/pms/productAttr/productAttrList.vue 4:14-406 13:3-17:5 14:22-414 @ ./src/views/pms/productAttr/productAttrList.vue @ ./src/router/index.js @ ./src/main.js @ multi (webpack)-dev-server/client?http://localhost:8090 webpack/hot/dev-server ./src/main.js
尝试过的解决方式:
[root@docker1 node_modules]# cnpm install node-sass ✔ Installed 1 packages ✔ Linked 219 latest versions [1/1] scripts.install node-sass@latest run "node scripts/install.js", root: "/app/bobby/mall-master/node_modules/node_modules/_node-sass@7.0.1@node-sass" Cached binary found at /root/.npminstall_tarball/node-sass/7.0.1/linux-x64-83_binding.node [1/1] scripts.install node-sass@latest finished in 224ms [1/1] scripts.postinstall node-sass@latest run "node scripts/build.js", root: "/app/bobby/mall-master/node_modules/node_modules/_node-sass@7.0.1@node-sass" Binary found at /app/bobby/mall-master/node_modules/node_modules/_node-sass@7.0.1@node-sass/vendor/linux-x64-83/binding.node Testing binary Binary is fine [1/1] scripts.postinstall node-sass@latest finished in 303ms ✔ Run 1 scripts deprecate node-sass@7.0.1 › request@^2.88.0 request has been deprecated, see https://github.com/request/request/issues/3142 deprecate node-sass@7.0.1 › request@2.88.2 › uuid@^3.3.2 Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. deprecate node-sass@7.0.1 › request@2.88.2 › har-validator@~5.1.3 this library is no longer supported ✔ All packages installed (243 packages installed from npm registry, used 3s(network 3s), speed 9.15KB/s, json 1(23.07KB), tarball 0B, manifests cache hit 218, etag hit 218 / miss 0)
安装了node-sass后启动还是报错
我的环境:服务器是centos7
29
收起
正在回答 回答被采纳积分+1
1回答
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星