【vue】遇到的问题
【一】项目编译的时候报错
npm install npm WARN @mtfe/thrift@2.3.7 requires a peer of thrift@0.11.0 but none is installed. You must install peer dependencies yourself. up to date in 7.835s
需要安装thrift依赖,执行命令
//电脑安装thrift软件 brew install thrift //npm安装thrift依赖 npm install thrift
【二】当前项目的所需的node.js版本不匹配当前电脑环境
在执行npm run dev命令抛出的异常
Module build failed: Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (64) For more information on which environments are supported please see: https://github.com/sass/node-sass/releases/tag/v4.8.3 at module.exports (/Users/s/a/d/d-portal/node_modules/node-sass/lib/binding.js:13:13) at Object.<anonymous> (/Users//Users/s/a/d/d-portal/node_modules/node-sass/lib/index.js:14:35) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/Users//Users/s/a/d/d-portal/node_modules/sass-loader/lib/loader.js:3:14) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) @ ./node_modules/vue-style-loader!./node_modules/css-loader?{"minimize":false,"sourceMap":false}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-7ba5bd90","scoped":false,"hasInlineConfig":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0&bustCache!./src/App.vue 4:14-390 13:3-17:5 14:22-398 @ ./src/App.vue @ ./src/main.js @ multi (webpack)-dev-server/client?http://localhost:8080 ./build/dev-client ./src/main.js error in ./src/views/layout/Layout.vue
解决方案,安装依赖
npm i node-sass -D