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

[Bug] npm run dev error : ERR_PACKAGE_PATH_NOT_EXPORTED #26

Open
choseungyoon opened this issue Nov 30, 2022 · 6 comments
Open

[Bug] npm run dev error : ERR_PACKAGE_PATH_NOT_EXPORTED #26

choseungyoon opened this issue Nov 30, 2022 · 6 comments

Comments

@choseungyoon
Copy link

choseungyoon commented Nov 30, 2022

Version

[email protected]

Reproduction link

https://github.com/creativetimofficial/notus-nextjs

Operating System

macOS Monterey

Device

MacBook Prom APPLE M1 Pro

Browser & Version

chrome & 107.0.0.1

Steps to reproduce

  1. Go to https://github.com/creativetimofficial/notus-nextjs
  2. Download code
  3. unzip
  4. npm install
  5. npm run dev -> error

What is expected?

run project

What is actually happening?

error when "npm run dev"

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

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/node' is not defined by "exports" in /Users/seungyuncho/Downloads/notus-nextjs-main/node_modules/postcss/package.json
at new NodeError (node:internal/errors:393:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:358:9)
at packageExportsResolve (node:internal/modules/esm/resolve:668:3)
at resolveExports (node:internal/modules/cjs/loader:529:36)
at Module._findPath (node:internal/modules/cjs/loader:569:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:981:27)
at Module._load (node:internal/modules/cjs/loader:841:27)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object. (/Users/seungyuncho/Downloads/notus-nextjs-main/node_modules/tailwindcss/lib/util/processPlugins.js:12:36) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
스크린샷 2022-11-30 오후 7 00 22
스크린샷 2022-11-30 오후 6 59 51


Solution

Additional comments

@tluyben
Copy link

tluyben commented Dec 5, 2022

Same issue here.

@VictorHenriquez
Copy link

Same issue running on w11

@fv3rdugo
Copy link

fv3rdugo commented Jan 18, 2023

In /Users/XXXX/src/notus-nextjs/node_modules/next/node_modules/postcss/package.json

Now, when you exec npm install exports is:

"exports": {
".": {
"require": "./lib/postcss.js",
"import": "./lib/postcss.mjs",
"types": "./lib/postcss.d.ts"
},
"./": "./"
},

In the past the content was: ( It's work with this exports)

"exports": {
".": {
"require": "./lib/postcss.js",
"import": "./lib/postcss.mjs",
"types": "./lib/postcss.d.ts"
},
"./lib/at-rule": "./lib/at-rule.js",
"./lib/comment": "./lib/comment.js",
"./lib/container": "./lib/container.js",
"./lib/css-syntax-error": "./lib/css-syntax-error.js",
"./lib/declaration": "./lib/declaration.js",
"./lib/fromJSON": "./lib/fromJSON.js",
"./lib/input": "./lib/input.js",
"./lib/lazy-result": "./lib/lazy-result.js",
"./lib/no-work-result": "./lib/no-work-result.js",
"./lib/list": "./lib/list.js",
"./lib/map-generator": "./lib/map-generator.js",
"./lib/node": "./lib/node.js",
"./lib/parse": "./lib/parse.js",
"./lib/parser": "./lib/parser.js",
"./lib/postcss": "./lib/postcss.js",
"./lib/previous-map": "./lib/previous-map.js",
"./lib/processor": "./lib/processor.js",
"./lib/result": "./lib/result.js",
"./lib/root": "./lib/root.js",
"./lib/rule": "./lib/rule.js",
"./lib/stringifier": "./lib/stringifier.js",
"./lib/stringify": "./lib/stringify.js",
"./lib/symbols": "./lib/symbols.js",
"./lib/terminal-highlight": "./lib/terminal-highlight.js",
"./lib/tokenize": "./lib/tokenize.js",
"./lib/warn-once": "./lib/warn-once.js",
"./lib/warning": "./lib/warning.js",
"./package.json": "./package.json"
},

I think it's related with any update changes ...

@AndreewMelnik
Copy link

Same problem for me

@thebluekube
Copy link

thebluekube commented Jan 29, 2023

We had the same issue. Using node version 16.9.0. Resolved this for us.

@dondonjang
Copy link

dondonjang commented Mar 6, 2023

it is package version issue
I resolved this issue

It is my updated dependencies

next                              10.0.9   →   12.2.0
react                           17.0.1   →   18.2.0
react-dom                       17.0.1  →   18.2.0
react-scripts                     4.0.3   →    5.0.1
tailwindcss                      1.8.10   →    2.0.4
postcss                        8.2.8   →    8.4.14

wenion added a commit to wenion/notus-nextjs that referenced this issue May 16, 2023
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

7 participants