npm ERR! enoent This is related to npm not being able to find a file.

背景

老板要求做react版本todolist,结果运行npm install -g create-react-app报错

npm ERR! enoent This is related to npm not being able to find a file.

解决

到access后面指向的目录,把create-react-app删除,再重新执行就好了。