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

yarn build / yarn start give me Package subpath './lib/tokenize' is not defined by "exports" #62

Open
CICCIOSGAMINO opened this issue Mar 13, 2023 · 3 comments

Comments

@CICCIOSGAMINO
Copy link

I'm trying to install and run the project in environment with Yarn 1.3.2 and Node.js 19.7.0 but i get the error:

yarn run v1.3.2
$ react-scripts start
node:internal/modules/cjs/loader:585
throw e;
^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /home/ciccio/Downloads/toremove/doctr-tfjs-demo/node_modules/postcss-safe-parser/node_modules/postcss/package.json

@bruno353
Copy link

I'm trying to install and run the project in environment with Yarn 1.3.2 and Node.js 19.7.0 but i get the error:

yarn run v1.3.2 $ react-scripts start node:internal/modules/cjs/loader:585 throw e; ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /home/ciccio/Downloads/toremove/doctr-tfjs-demo/node_modules/postcss-safe-parser/node_modules/postcss/package.json

Yeah, me too. Any solution?

@alphabetaxz
Copy link

Node.js 12 is ok

@romainligneul
Copy link

romainligneul commented Oct 16, 2024

I managed to make it work with Node 18 with the following steps.

Install last versions of:
npm install postcss postcss-safe-parser

Add to package.json:

{
  "exports": {
    "./lib/tokenize": "./lib/tokenize.js"
  }
}

Still in package.json add openssl legacy flags (not sure they are all needed, but at least for start)

  "scripts": {
    "start": "react-scripts --openssl-legacy-provider start",
    "build": "react-scripts --openssl-legacy-provider build",
    "test": "react-scripts --openssl-legacy-provider test",
    "eject": "react-scripts --openssl-legacy-provider eject"
  }

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

4 participants