问题一:ERROR in Cannot find module 'node-sass'
错误表示找不到node-sass模块。
网上查了下我是因为cnpm安装导致的,换成npm安装就好
或者cnpm install node-sass
或者node-sass需要编译环境,我的配置是win7+vs2013+nodejs4.2.6+python2.7.3
问题二:vue vue-style-loader !css-loader错误
最近在学习vue框架,使用webpack打包vue项目,在执行npm run start的时候 出现如下错误:
This dependency was not found:
* !!vue-style-loader!css-loader?{"minimize":false,"sourceMap":false}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-1d57e5ea","scoped":false,"hasInlineConfig":false}!stylus-loader?{"sourceMap":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./a.vue in ./src/components/a.vue
To install it, you can run: npm install --save !!vue-style-loader!css-loader?{"minimize":false,"sourceMap":false}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-1d57e5ea","scoped":false,"hasInlineConfig":false}!stylus-loader?{"sourceMap":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./a.vu
解决思路:
npm install sass-loader --save;
npm install node-sass --save;
然后运行npm run dev就可以