creativetimofficial / notus-react

Notus React: Free Tailwind CSS UI Kit and Admin
https://www.creative-tim.com/product/notus-react
MIT License
771 stars 1.08k forks source link

[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 #22

Open lnavarroa opened 1 year ago

lnavarroa commented 1 year ago

What is your enhancement?

I'm trying to build, but this error appears notus-react@1.1.0 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

moomoo-dev commented 12 months ago

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

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

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
AdenJD commented 10 months ago

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!

zehranurkok commented 9 months ago

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.