'Could not find source file at index.ios.js' 当我 运行 'react-native bundle --minify'
'Could not find source file at index.ios.js' when I run 'react-native bundle --minify'
我正在尝试将我的 React Native 提交到应用商店。当我从项目的根文件夹中 运行 react-native bundle --minify
时,出现以下错误:
Building package...
/AppName/node_modules/react-native/node_modules/promise/lib/done.js:10
throw err;
^
NotFoundError: Could not find source file at index.ios.js
at /AppName/node_modules/react-native/packager/react-packager/src/DependencyResolver/DependencyGraph/index.js:169:15
at tryCallOne (/AppName/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
at /AppName/node_modules/react-native/node_modules/promise/lib/core.js:103:15
at flush (/AppName/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
at process._tickCallback (node.js:355:11)
我想通了。 index.ios.js 需要在 root/main 目录中。我把它放在我创建的目录中。
我正在尝试将我的 React Native 提交到应用商店。当我从项目的根文件夹中 运行 react-native bundle --minify
时,出现以下错误:
Building package...
/AppName/node_modules/react-native/node_modules/promise/lib/done.js:10
throw err;
^
NotFoundError: Could not find source file at index.ios.js
at /AppName/node_modules/react-native/packager/react-packager/src/DependencyResolver/DependencyGraph/index.js:169:15
at tryCallOne (/AppName/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
at /AppName/node_modules/react-native/node_modules/promise/lib/core.js:103:15
at flush (/AppName/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
at process._tickCallback (node.js:355:11)
我想通了。 index.ios.js 需要在 root/main 目录中。我把它放在我创建的目录中。