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 start fails on Node v17.3.0 #5

Open
lordofthecactus opened this issue Mar 16, 2022 · 4 comments
Open

yarn start fails on Node v17.3.0 #5

lordofthecactus opened this issue Mar 16, 2022 · 4 comments

Comments

@lordofthecactus
Copy link

yarn start fails on Node 17.3.0

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

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /Users/ieldanr/src/github.com/personal/recoil-course/node_modules/postcss-safe-parser/node_modules/postcss/package.json
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:429:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:683: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.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/ieldanr/src/github.com/personal/recoil-course/node_modules/postcss-safe-parser/lib/safe-parser.js:1:17) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v17.3.0
@lordofthecactus
Copy link
Author

Downgrading to Node v16 works

@lordofthecactus
Copy link
Author

After investigating, this course uses [email protected] which uses [email protected] which is not compatible with Node v17.

Should a requirement be set or libs updated?

@iinhyeChoii
Copy link

iinhyeChoii commented Mar 29, 2023

@lordofthecactus,
I also encountered the same issue. I solved it by simply upgrading react-script version. :)

@AlejandroFlorez
Copy link

Here is what worked for me:

  • Migrate react scripts from version 4 to version 5 using the following:
    yarn add --exact [email protected]
  • Delete the node_modules and re-run yarn install
  • Run yarn start

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

3 participants