Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation issues with latest react native #107

Closed
marksyzm opened this issue Jul 15, 2022 · 5 comments · Fixed by #108
Closed

Installation issues with latest react native #107

marksyzm opened this issue Jul 15, 2022 · 5 comments · Fixed by #108
Labels

Comments

@marksyzm
Copy link

In react native using M1 and , I get a weird export issue as follows:

~/Sites/scratch/fortune2 » npm start 

> fortune@0.0.1 start /Users/****/Sites/scratch/fortune2
> react-native start

error Failed to load configuration of your project.
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package.json' is not defined by "exports" in /Users/****/Sites/scratch/fortune2/node_modules/pitchy/package.json
    at new NodeError (node:internal/errors:377:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:440:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:719:3)
    at resolveExports (node:internal/modules/cjs/loader:483:36)
    at Module._findPath (node:internal/modules/cjs/loader:523:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:925:27)
    at Function.resolve (node:internal/modules/cjs/helpers:108:19)
    at resolveNodeModuleDir (/Users/****/Sites/scratch/fortune2/node_modules/@react-native-community/cli-tools/build/resolveNodeModuleDir.js:24:42)
    at /Users/****/Sites/scratch/fortune2/node_modules/@react-native-community/cli-config/build/loadConfig.js:93:76
    at Array.reduce (<anonymous>)

Any ideas what would cause it on this set up? I've got node v16

ianprime0509 added a commit that referenced this issue Jul 15, 2022
Apparently, React Native and various bundler tools expect to be able to
import/require package.json, which will fail if `exports` is being used
but not exporting package.json:
uuidjs/uuid#444

Fixes #107
ianprime0509 added a commit that referenced this issue Jul 15, 2022
Apparently, React Native and various bundler tools expect to be able to
import/require package.json, which will fail if `exports` is being used
but not exporting package.json:
uuidjs/uuid#444

Fixes #107
@github-actions
Copy link

🎉 This issue has been resolved in version 4.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ianprime0509
Copy link
Owner

Thanks for pointing this out! Apparently this is a common issue encountered by other projects using the exports field in package.json: uuidjs/uuid#444

The fix was merged in #108 and is present in version 4.0.6.

@marksyzm
Copy link
Author

@ianprime0509 perfect! Thanks so much

@marksyzm
Copy link
Author

marksyzm commented Jul 15, 2022

Thanks for pointing this out! Apparently this is a common issue encountered by other projects using the exports field in package.json: uuidjs/uuid#444

Cool! I couldn't work out what the exact fix was but I knew it was simple

@marksyzm
Copy link
Author

Tested just now and I can confirm this works perfectly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants