electron day001

☝️必须node版本是最新的,如果不是请执行

$node -v

v8.5.0

$sudo npm install -g n

Password:

/usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n

+ [email protected]

added 1 package in 3.477s

$node -v

v8.5.0

$sudo n latest

 

     install : node-v9.11.1

       mkdir : /usr/local/n/versions/node/9.11.1

       fetch : https://nodejs.org/dist/v9.11.1/node-v9.11.1-darwin-x64.tar.gz

######################################################################## 100.0%

   installed : v9.11.1

1>  git clone https://github.com/xxx/xxxxxx

2>  npm install

3>  当你出现这个问题的时候:   sudo npm install

npm --registry=https://registry.npm.taobao.org --cache=$HOME/.npm/.cache/cnpm --disturl=https://npm.taobao.org/dist --userconfig=$HOME/.cnpmrc install

sudo rm -rf /node_modules

 

猜你喜欢

转载自www.cnblogs.com/yanghaiyan/p/8922733.html