dart-sass 代替 node-sass

npm版本报错

package.json 里面的 npm版本优先级高于 node_modules里面的
重新安装 npm,解决 npm依赖版本不一致报错的问题

scripts-prepend-node-path

没有找到可执行的node
Use the —scripts-prepend-node-path option to include the path for the node binary npm was executed with.

  1. The node binary used for scripts is C:\Users\admin\Desktop\goc-passport\node_modules\node\bin\node.exe but npm is using C:\Program Files\nodejs\node.exe itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

解决:

  1. npm config set scripts-prepend-node-path true

error code ELIFECYCLE

error code ELIFECYCLE,win10不支持 rm命令,用 cmder,或 git-bash

  1. # 清除缓存
  2. npm cache clean --force
  3. rm -rf node_modules
  4. rm -rf package-lock.json
  5. npm install
  6. npm config set scripts-prepend-node-path true

npm install成功之后再次启动 npm start