json - React Native 打包器找不到 package.json

标签 json react-native npm atom-editor nuclide-editor

我安装了 Atom 和 Nuclide,并在 Atom 中打开了一个新初始化的 React Native 项目。一旦我尝试启动 React Native Packager,我收到一条错误消息

An unexpected error occurred while running the React Native Packager process: ENOTDIR: not a directory, stat '/Users/UserName/Documents/MyProjectDirectory/ProjectName/package.json/package.json'

enter image description here

没有名为 package.json 的目录,我不知道这条路径是如何损坏的。任何帮助将不胜感激。

最佳答案

不是解决方案,而是目前的解决方法:

You can run the following to start the packager manually: npm start

或者,一般来说,运行react-native run-ios(或run-android)将理所当然地启动打包程序(在单独的终端窗口中) .

(也不知道为什么会这样;对我来说,是在从 RN 0.49 ~> 0.50 升级之后。)

关于json - React Native 打包器找不到 package.json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47193363/

相关文章:

javascript - Jquery/PHP : passing JSON data with Ajax ends up truncated

javascript - 按键组合json数组,javascript

javascript - ReactJS,Javascript,使用状态更改的导入函数的正确方法

angularjs - 浏览器同步 headless 环境错误

java - 放心 : JSON path body doesn't match doubles

reactjs - 必须运行函数 2 次才能将值设置为 react 状态?

javascript - 来自 API 调用的图像渲染 - React Native

Node.js 的 npm 安装了错误的包

azure - 构建失败并显示 'npm' 未被识别为内部或外部命令

android - [ flutter ]未处理的异常: NoSuchMethodError: The method '[]' was called on null