question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' error

See original GitHub issue

after yarn create-react-app and yarn start, the below error message was displayed. how solve it? my node version is v17.0.1

> docker_react_app@0.1.0 start
> 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/satoutaishin/Desktop/practice/docker_react_app/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:416:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:669: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/satoutaishin/Desktop/practice/docker_react_app/node_modules/postcss-safe-parser/lib/safe-parser.js:1:17) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v17.0.1

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:10
  • Comments:9

github_iconTop GitHub Comments

4reactions
taitasu555commented, Nov 9, 2021

@nhall97 Exactly! we can not use create-react-app with node v17 I downgraded my node version 16 and worked

1reaction
zhdlxh48commented, Oct 24, 2021

I also have same issue. But, I guess, the problem is node version 17. Did you use node version 17? I reinstall node version 16, and remove node_modules folder then reinstalled. And It works perfectly!

@zhdlxh48 I used node version17 so I downgrade node 16. Then it works. This error occurs because of node 17.

Thanks your!

Great! Have a nice day!

Read more comments on GitHub >

github_iconTop Results From Across the Web

131 - Stack Overflow
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in the package.json of a module in ...
Read more >
Issues - GitHub
lib/tokenize' is not defined by "exports" for postcss-safe-parser ... [0] [0] Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath '.
Read more >
React web app Node.js v17.0.1 - Flutter Developer
Solved — Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by “exports” in the package.json of a module ...
Read more >
Introduction - dark-hamster
How to Solve Error Message [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by “exports” · First of all, taking ...
Read more >
When I run yarn start , I get this error - Reddit
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /root/.../package.json.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found