我安装了 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'
没有名为 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/