Same reason as for #173, both @babel/core & @babel/runtime packages are required for command ./gradlew assembleRelease on newer versions/master if not installing devDependencies (such as running npm install --production --ignore-scripts --no-optional)
otherwise results are:
For @babel/core:
> Task :app:bundleReleaseJsAndAssets
warn Package @babel/core has been ignored because it contains invalid configuration. Reason: Cannot find module '@babel/core/package.json'
error index.js: Cannot find module '@babel/core'
Require stack:
- /app/hamagen-react-native/node_modules/@babel/plugin-transform-block-scoping/lib/tdz.js
- /app/hamagen-react-native/node_modules/@babel/plugin-transform-block-scoping/lib/index.js
- /app/hamagen-react-native/node_modules/metro-react-native-babel-preset/src/configs/main.js
- /app/hamagen-react-native/node_modules/metro-react-native-babel-preset/src/index.js
- /app/hamagen-react-native/node_modules/react-native/node_modules/@babel/core/lib/config/files/plugins.js
- /app/hamagen-react-native/node_modules/react-native/node_modules/@babel/core/lib/config/files/index.js
- /app/hamagen-react-native/node_modules/react-native/node_modules/@babel/core/lib/index.js
- /app/hamagen-react-native/node_modules/react-native/node_modules/metro/src/JSTransformer/worker.js
- /app/hamagen-react-native/node_modules/metro/src/DeltaBundler/Worker.js
- /app/hamagen-react-native/node_modules/jest-worker/build/workers/processChild.js. Run CLI with --verbose flag for more details.
Error: Cannot find module '@babel/core'
Require stack:
- /app/hamagen-react-native/node_modules/@babel/plugin-transform-block-scoping/lib/tdz.js
- /app/hamagen-react-native/node_modules/@babel/plugin-transform-block-scoping/lib/index.js
- /app/hamagen-react-native/node_modules/metro-react-native-babel-preset/src/configs/main.js
- /app/hamagen-react-native/node_modules/metro-react-native-babel-preset/src/index.js
- /app/hamagen-react-native/node_modules/react-native/node_modules/@babel/core/lib/config/files/plugins.js
- /app/hamagen-react-native/node_modules/react-native/node_modules/@babel/core/lib/config/files/index.js
- /app/hamagen-react-native/node_modules/react-native/node_modules/@babel/core/lib/index.js
- /app/hamagen-react-native/node_modules/react-native/node_modules/metro/src/JSTransformer/worker.js
- /app/hamagen-react-native/node_modules/metro/src/DeltaBundler/Worker.js
- /app/hamagen-react-native/node_modules/jest-worker/build/workers/processChild.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/app/hamagen-react-native/node_modules/@babel/plugin-transform-block-scoping/lib/tdz.js:8:13)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
For @babel/runtime:
warn Package @babel/runtime has been ignored because it contains invalid configuration. Reason: Cannot find module '@babel/runtime/package.json'
error Unable to resolve module `@babel/runtime/helpers/interopRequireDefault` from `index.js`: @babel/runtime/helpers/interopRequireDefault could not be found within the project.
If you are sure the module exists, try these steps:
1. Clear watchman watches: watchman watch-del-all
2. Delete node_modules: rm -rf node_modules and run yarn install
3. Reset Metro's cache: yarn start --reset-cache
4. Remove the cache: rm -rf /tmp/metro-*. Run CLI with --verbose flag for more details.
Error: Unable to resolve module `@babel/runtime/helpers/interopRequireDefault` from `index.js`: @babel/runtime/helpers/interopRequireDefault could not be found within the project.
Same reason as for #173, both
@babel/core
&@babel/runtime
packages are required for command./gradlew assembleRelease
on newer versions/master if not installing devDependencies (such as runningnpm install --production --ignore-scripts --no-optional
)otherwise results are:
For
@babel/core
:For
@babel/runtime
: