Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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 this issue Mar 24, 2023 · 3 comments

Comments

@lnavarroa
Copy link

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

@lnavarroa lnavarroa changed the title [Feature Request] 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 [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 Mar 24, 2023
@moomoo-dev
Copy link

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

@AdenJD
Copy link

AdenJD commented Aug 14, 2023

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants