创建了一个vue项目,运行时报错

Lenovo@DESKTOP-D50VSUF MINGW64 /f/vue/chapter7 (master)
$ cd hello-vue

Lenovo@DESKTOP-D50VSUF MINGW64 /f/vue/chapter7/hello-vue (master)
$ npm run serve

hello-vue@0.1.0 serve
vue-cli-service serve

'"node"' is not recognized as an internal or external command,
operable program or batch file.

参考

会不会是你的node.js配置方面出了问题,npm配置淘宝镜像后再试试

npm config set registry https://registry.npm.taobao.org

基于问题

  1. 最简单的方式就是重启
  2. node的配置安装有问题 如果你使用过npm install -g cnpm --registry=https://registry.npm.taobao.org的方式的话 需要全局安装nrm的镜像命令 不然会抛出你上面的不能识别的问题

祝好