第一次运行前端框架
由于模块代码都是直接拉下来的所以需要下载依赖
npm install
然后下载时是会报红,并且运行时显示 Cannot find module ‘node-sass‘
(这里不知道为啥,我是后端开发,)可能是install 下载下来的有问题
解决办法:
windows操作窗口 windows+r 输入cmd
输入命令
cnpm uninstall node-sass (如果提示cnpm 命令不存在,先换源:npm set registry https://registry.npm.taobao.org/ 再下载安装:npm install -g cnpm --registry=https://registry.npm.taobao.org )
cnpm install node-sass@4.14.1
然后就输入 npm run serve / npm run dev 运行