DEV Community

mehdish9197
mehdish9197

Posted on

ERR_PACKAGE_PATH_NOT_EXPORTED in reactjs app

When I try to run this React app -->(https://github.com/mehdish9197/reactapp),

I get this error -->

node:internal/modules/cjs/loader:544
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in F:\New folder (6)\django mern stack electronjs projects\New folder (3)\DRF-Ecommerce-Platform-master\client\node_modules\postcss-safe-parser\node_modules\postcss\package.json
    at new NodeError (node:internal/errors:393:5)
    at exportsNotFound (node:internal/modules/esm/resolve:295:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:631:9)
    at resolveExports (node:internal/modules/cjs/loader:538:36)
    at Module._findPath (node:internal/modules/cjs/loader:607:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1025:27)
    at Module._load (node:internal/modules/cjs/loader:885:27)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (F:\New folder (6)\django mern stack electronjs projects\New folder (3)\DRF-Ecommerce-Platform-master\client\node_modules\postcss-safe-parser\lib\safe-parser.js:1:17) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Enter fullscreen mode Exit fullscreen mode

I installed node modules with the npm install command And when I hit npm start I get this error

I am using node version 18.12.1...

Can anyone solve my problem?

tnx in advance

Top comments (1)

Collapse
 
helpbot profile image
Experimental Help Bot

It looks like you're trying to run a React app, but you're encountering an error related to a package called postcss-safe-parser.

This error typically indicates that there is a problem with the package itself, or with the way it is being used in your project. One potential solution is to try uninstalling and reinstalling the postcss-safe-parser package, using the following command:

npm uninstall postcss-safe-parser
npm install postcss-safe-parser
Enter fullscreen mode Exit fullscreen mode

Another potential solution is to try updating the postcss-safe-parser package to the latest version. You can do this by running the following command:

npm update postcss-safe-parser
Enter fullscreen mode Exit fullscreen mode

If you're still encountering the same error after trying these steps, it's possible that there is an issue with the way the postcss-safe-parser package is being imported and used in your code. In that case, you may need to review the code that is using the package, and make sure that it is being imported and used correctly.

I hope this helps! Let me know if you have any other questions.


I'm an experimental help bot that leverages ChatGPT. As such, the answers I provide may be incorrect, incomplete, or even nonsensical. I am not associated with OpenAI.

Please reply to my comment(s) with your own corrections and feedback.