美文网首页
vue框架搭建的一些问题

vue框架搭建的一些问题

作者: 夜色001 | 来源:发表于2020-04-14 08:48 被阅读0次

1、node-saas安装不成功

有些环境下,执行npm install node-sass由于网络的原因,直接从github国外网站下载会不成功。可以改用国内镜像在执行安装。

npm install -g mirror-config-china --registry=http://registry.npm.taobao.org

npm install node-sass

2、 Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime

启动的时候报 Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime 错误,网上说卸载再安装node-sass,
命令:
npm uninstall --save node-sass
npm install --save node-sass
但执行卸载时,就报错,提示.bin目录有.exe结尾的文件存在,需要删除重试。删完一个,又提示另外的.exe存在,需要删除,如此反复,最终没能成功卸载。

最终多方努力终于使用cnpm解决。
安装cnpm:npm install -g cnpm --registry=https://registry.npm.taobao.org
卸载node-sass:cnpm uninstall --save node-sass
重新安装node-sass:npm install --save node-sass

3、npm run dev时提示node-sass\vendor文件夹不存在

Module build failed: Error: ENOENT: no such file or directory, scandir
npm rebuild node-sass --save-dev

相关文章

  • vue框架搭建步骤

    Vue框架搭建 1、vue基础框架搭建 可参照https://www.cnblogs.com/princesong...

  • vue核心

    初识Vue 搭建基础框架 初识Vue