Package subpatch ./package.json is not defined by "exports"
ghivert opened this issue · 1 comments
ghivert commented
Hi and first thanks for the excellent work!
I upgraded my React Native app to the latest version, and upgraded chalk by the way (I'm using it in all my scripts).
Unfortunately, I got an error with the v5.
Below some details. I don't really get what's happening, but downgrading to v4 is working perfectly!
[!] Invalid `Podfile` file: 859: unexpected token at 'Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package.json' is not defined by "exports" in appdirectory/node_modules/chalk/package.json
at new NodeError (node:internal/errors:371:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:440:9)
at packageExportsResolve (node:internal/modules/esm/resolve:692:3)
at resolveExports (node:internal/modules/cjs/loader:482:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.resolve (node:internal/modules/cjs/helpers:108:19)
at resolveNodeModuleDir (appdirectory/node_modules/@react-native-community/cli-tools/build/resolveNodeModuleDir.js:24:42)
at appdirectory/node_modules/@react-native-community/cli-config/build/loadConfig.js:93:76
at Array.reduce (<anonymous>)
info Run CLI with --verbose flag for more details.
'.
# from appdirectory/ios/Podfile:12
# -------------------------------------------
# target 'App' do
> config = use_native_modules!
#
# -------------------------------------------
I can try to provide more details if you need it. 🙂
sindresorhus commented
This is a problem with the React Native build tool, not this package. You should open an issue on React Native instead.