React-native:需要未知模块“./_castPath”

时间:2022-05-14 04:44:05

I just started getting this error today. I'm not requiring that file and if I grep in my project directory for "castPath", nothing shows up so I'm not sure where this is actually happening. Googling turned up nothing as well.

我今天刚开始收到这个错误。我不需要那个文件,如果我在我的项目目录中grep“castPath”,没有任何显示,所以我不确定这实际发生在哪里。谷歌搜索也没有任何结果。

React-native:需要未知模块“./_castPath”

1 个解决方案

#1


0  

Figured it out. I was trying to run the project using a version of node different than what I had installed and built the packages with.

弄清楚了。我试图使用与我安装的节点不同的节点运行项目并使用它构建包。

Needed to nuke my installed packages (rm -rf ./node_modules) and start again (npm install).

需要核对我安装的软件包(rm -rf ./node_modules)并重新启动(npm install)。

#1


0  

Figured it out. I was trying to run the project using a version of node different than what I had installed and built the packages with.

弄清楚了。我试图使用与我安装的节点不同的节点运行项目并使用它构建包。

Needed to nuke my installed packages (rm -rf ./node_modules) and start again (npm install).

需要核对我安装的软件包(rm -rf ./node_modules)并重新启动(npm install)。