Niewtone
Niewtone

Reputation: 19

How can I fix a a npm/yarn start issue?

    yarn run v1.22.10
$ 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/victor/Desktop/epitech/tek3/project/B-DEV-500-NCE-5-1-dashboard-victor.sorais/epiboard/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> (/home/victor/Desktop/epitech/tek3/project/B-DEV-500-NCE-5-1-dashboard-victor.sorais/epiboard/node_modules/postcss-safe-parser/lib/safe-parser.js:1:17) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

I created a react app with npx-create-app <app_name>, but i don't understand what is the problem, I've already updated all my package, tested rm all webpack package and npm install and more other option. Any idea ?

Upvotes: 0

Views: 812

Answers (1)

Apoorva Chikara
Apoorva Chikara

Reputation: 8783

You can temporarily fix this issue by downgrading the node version to 16.13.0. If you are running it on mac you can install nodeV16.

brew install node@16

It seems a lot of people are facing these issues with the latest node version. I am attaching some links which might help you resolve this (link1 and link2) if above thing doesn't work.

Note: remove the existing version and install a new fresh one. You can check this link to remove it completely(I am not writing same commands with description as a lot people already explained it)

Upvotes: 1

Related Questions