安装node-npm的过程
下面是想起的安装及示例测试过程
安装node-npm详细过程
遇到这个问题需要npm init -y
npm install dependencies
npm WARN saveError ENOENT: no such file or directory, open 'C:\Windows\system32\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Windows\system32\package.json'
遇到这个 需要npm install dependencies
Failed to install dependencies. Please run 'npm install' manually!
首先一定要改镜像,因为墙的问题,很多东西安装不成功,
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global
再用
npm config get registry 查看本地镜像源
关于node-sass安装更改各种镜像,linux和windows和各种方法
但是在导入别人的项目时候,npm install,就会出现各种问题,首先遇到的可能是chromedriver 安装不动
通过改镜像安装可以解决
npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
然后可能遇到note-sass安装不成功的问题,也通过改镜像
npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
也可以解决,之后就可以npm run dev了,但是由于之前遇到的各种问题,npm install过很多次,所以每次都需要在项目文件夹中删除node-modules文件夹,再重新npm install