notus-react icon indicating copy to clipboard operation
notus-react copied to clipboard

[Feature Request] Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /var/www/html/my_proyect/public_html/notus-react-main/node_modules/postcss/package.json

Open lnavarroa opened this issue 2 years ago • 3 comments

What is your enhancement?

I'm trying to build, but this error appears [email protected] build

react-scripts build && gulp licenses

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

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /var/www/html/lnavarroa.cl/public_html/notus-react-main/node_modules/postcss/package.json at new NodeError (node:internal/errors:399:5) at exportsNotFound (node:internal/modules/esm/resolve:361:10) at packageExportsResolve (node:internal/modules/esm/resolve:697:9) at resolveExports (node:internal/modules/cjs/loader:565:36) at Module._findPath (node:internal/modules/cjs/loader:634:31) at Module._resolveFilename (node:internal/modules/cjs/loader:1061:27) at Module._load (node:internal/modules/cjs/loader:920:27) at Module.require (node:internal/modules/cjs/loader:1141:19) at require (node:internal/modules/cjs/helpers:110:18) at Object. (/var/www/html/lnavarroa.cl/public_html/notus-react-main/node_modules/postcss-safe-parser/lib/safe-parser.js:1:17) { code: 'ERR_PACKAGE_PATH_NOT_EXPORTED' }

Node.js v18.15.0

lnavarroa avatar Mar 24 '23 15:03 lnavarroa

I got this fixed... it took some digging around, but here is how i did it.

Since I didn't try this with a fresh repo I did the first steps which was npm run build:tailwind

  • Then I ran these commands npm update npm audit fix --force

  • Then I delete react-scripts in the node_modules folder and ran npm install react-scripts

  • Then I realized that postcss had an update which fixed this issue, so I updated the postcss reference in the package.json.

  • "postcss": "8.2.12",

  • Then ran the command npm update

I'm sure that you might be able to consolidate some of these steps like

  • adding the postcss version change
  • then npm install
  • npm update
  • npm audit fix --force

Here is a screen shot of me running it after I did all of that

Screen Shot 2023-07-05 at 3 01 42 PM

moomoo-dev avatar Jul 05 '23 19:07 moomoo-dev

I got this fixed... it took some digging around, but here is how i did it.

Since I didn't try this with a fresh repo I did the first steps which was npm run build:tailwind

  • Then I ran these commands npm update npm audit fix --force
  • Then I delete react-scripts in the node_modules folder and ran npm install react-scripts
  • Then I realized that postcss had an update which fixed this issue, so I updated the postcss reference in the package.json.
  • "postcss": "8.2.12",
  • Then ran the command npm update

I'm sure that you might be able to consolidate some of these steps like

  • adding the postcss version change
  • then npm install
  • npm update
  • npm audit fix --force

Here is a screen shot of me running it after I did all of that

Screen Shot 2023-07-05 at 3 01 42 PM

Fixed the same issue for me, thanks!

AdenJD avatar Aug 14 '23 01:08 AdenJD

I got this fixed... it took some digging around, but here is how i did it.

Since I didn't try this with a fresh repo I did the first steps which was npm run build:tailwind

  • Then I ran these commands npm update npm audit fix --force
  • Then I delete react-scripts in the node_modules folder and ran npm install react-scripts
  • Then I realized that postcss had an update which fixed this issue, so I updated the postcss reference in the package.json.
  • "postcss": "8.2.12",
  • Then ran the command npm update

I'm sure that you might be able to consolidate some of these steps like

  • adding the postcss version change
  • then npm install
  • npm update
  • npm audit fix --force

Here is a screen shot of me running it after I did all of that

Screen Shot 2023-07-05 at 3 01 42 PM

Thanks a lot. This solution works for me too.

zehranurkok avatar Oct 05 '23 22:10 zehranurkok