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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了npm ERR! This is related to npm not being able to find a file.相关的知识,希望对你有一定的参考价值。

参考技术A 问题:

执行npm start出现了以下报错

解决办法情况1:确认自己是否进入了create-react-app my-app命令创建的my-app项目的目录,未进入依次执行cd ma-app 和npm start即可。

解决办法情况2:目录进入正确npm start错误,这时可以进入自己电脑的项目文件中去删除node_modules和package-lock.json,然后回到控制台npm i或npm install安装依赖,执行npm start即可。

这是我个人小白成长道路下的第一个问题,就随手记录下来了。当时百度的很多解决方法是删除文件路径中的node_modules,然后再重新npm install 安装。不过我尝试了几次都失败了。原因很简单,不是依赖的问题,而是目录的问题,执行npm start命令要在创建本项目的src的上一级目录执行,先cd newspaper,再执行npm start。我的文件目录如下:

# npm install 安装报错 this is a problem related to network connectivity, behind a proxy

https://blog.csdn.net/weixin_38292069/article/details/85005443

以上是关于npm ERR! This is related to npm not being able to find a file.的主要内容,如果未能解决你的问题,请参考以下文章

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

clon远程项目后,npm install 报错——cb() never called!This is an error with npm itself. Please report this err

Failed at the node-sass@4.14.1 postinstall script. npm ERR! This is probably not a problem with npm(

Failed at the node-sass@4.14.1 postinstall script. npm ERR! This is probably not a problem with npm(

Failed at the node-sass@4.13.1 postinstall script. npm ERR! This is probably not a problem with npm.

npm ERR! asyncWrite is not a function