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.

Error on yarn start: ERR_PACKAGE_PATH_NOT_EXPORTED

See original GitHub issue

I checked out the code and tried to run it on the following revision and yarn version:

$ git rev-parse --short HEAD
5bcaa225
$ yarn --version
1.22.19
$ node --version
v17.9.0

I ran yarn to install the dependencies and everything worked fine. When I do yarn start I see the following error and the server fails to start:

$ yarn start
yarn run v1.22.19
$ 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 /home/alex/code/excalidraw/node_modules/postcss-safe-parser/node_modules/postcss/package.json
    at new NodeError (node:internal/errors:372: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: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> (/home/alex/code/excalidraw/node_modules/postcss-safe-parser/lib/safe-parser.js:1:17) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v17.9.0

How can I fix this and launch excalidraw locally?

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
zhangdongxuancommented, Jul 12, 2022

I have same error with you, but after I run ‘yarn upgrade’, then ‘yarn start’, it work fine.

0reactions
RiverOnVenuscommented, Oct 29, 2022

In the latest version just released, the same problem also occurs (Nodejs 19.0.0), solved using yarn upgrade.

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Yarn start not working | error ` ...
yarn run v1.22.17 $ react-scripts start node:internal/modules/cjs/loader:488 throw e; ^ Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package ...
Read more >
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]
Run the npm update command to solve the "Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No 'exports'" and then run npm audit fix --force if necessary.
Read more >
[Solved]-Yarn start not working
Coding example for the question Yarn start not working | error `ERR_PACKAGE_PATH_NOT_EXPORTED'-Reactjs.
Read more >
ERR_PACKAGE_PATH_NOT_E...
Npm #NpmErrorERR_PACKAGE_PATH_NOT_EXPORTED NPM Error FixThe error Error [ ERR_PACKAGE_PATH_NOT_EXPORTED ]: No "exports" main resolved in...
Read more >
No "exports" main defined
resources/js/app.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No &
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