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

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in the package.jso #6

Open
Manuel-Suarez-Abascal opened this issue Nov 23, 2022 · 0 comments

Comments

@Manuel-Suarez-Abascal
Copy link

Describe the bug

When trying to run the project in development mode using NodeJS version 18.7.0, the app doesn't compile & throws an error message.

Steps to reproduce:

  • Having Node's version 18.7.0 installed.
  • navigate to the project's root & install the project's dependencies with the following command: npm i.
  • try starting the project with npm run start.

Expected results:
It was expected to compile in dev mode & launch React's an app in the browser like in the screenshot below:

Screenshot 2022-11-23 at 3 32 09 PM

Actual results:
It doesn't compile & it throws the following error instead:

[Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in the package.jso]

Workaround: 1

  • run the following commands:
npm i -D postcss@latest
export NODE_OPTIONS=--openssl-legacy-provider
npm install

Workaround: 2

  • uninstall NodeJs 18.7.0 version.
  • install NodeJs 19.1.0 version.

Start the project with the command: npm run start. The app should compile now.

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

No branches or pull requests

1 participant