Error on yarn start: ERR_PACKAGE_PATH_NOT_EXPORTED
See original GitHub issueI 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:
- Created a year ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have same error with you, but after I run ‘yarn upgrade’, then ‘yarn start’, it work fine.
In the latest version just released, the same problem also occurs (Nodejs 19.0.0), solved using
yarn upgrade
.