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

Error [ERR_PACKAGE_PATH_NOT_EXPORTED] #41

Open
ezeamaka2 opened this issue Feb 7, 2023 · 10 comments
Open

Error [ERR_PACKAGE_PATH_NOT_EXPORTED] #41

ezeamaka2 opened this issue Feb 7, 2023 · 10 comments

Comments

@ezeamaka2
Copy link

I think this course repo needs to be updated in other to work smoothly with next13 and react18 because I have been running into constant try to get starter-code up and running

@jbdura
Copy link

jbdura commented Feb 14, 2023

Have you managed to run your work? If so, what was the solution?

@ezeamaka2
Copy link
Author

I rewrote everything from scratch

@andseipa
Copy link

andseipa commented Mar 8, 2023

Had the same problem. Basically updated all the packages to the latest versions. No idea how that will affect the course material.

@ezeamaka2
Copy link
Author

After Updating all the packages, did it work?

@vitalik-prog
Copy link

I also faced with this problem. Nothing helped even upgrading all of the packages to the latest versions. So I deployed it to Netlify. On Netlify the project works fine except some small issues.

@diegoperesgarcia
Copy link

diegoperesgarcia commented Mar 15, 2023

I had the same issue here. I fixed changing version of dependencies in package.json.

Before:
"dependencies": {
"next": "10.0.6",
"react": "17.0.1",
"react-dom": "17.0.1"
}

After:
"dependencies": {
"next": "13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0"
}

Edit: Remember delete package-lock.json and the folder node_modules. After this run 'npm i' again.

@vitalik-prog
Copy link

vitalik-prog commented Mar 15, 2023 via email

@vitalik-prog
Copy link

I had the same issue here. I fixed changing version of dependencies in package.json.

Before: "dependencies": { "next": "10.0.6", "react": "17.0.1", "react-dom": "17.0.1" }

After: "dependencies": { "next": "13.2.4", "react": "18.2.0", "react-dom": "18.2.0" }

Edit: Remember delete package-lock.json and the folder node_modules. After this run 'npm i' again.

P.s. Thanks a lot for your help. It has been fixed. The main point which I skipped is - "delete package-lock.json". After deleting package-lock.json all came to the right place and the project was deployed successfully.

@ahmet-kok
Copy link

I deleted package-lock.json, and node_modulesI used this command and fixed.

npm i next@latest react@latest react-dom@latest eslint-config-next@latest

I used the default package.json:

{
  "name": "nextjs-course",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start"
  },
  "dependencies": {
    "eslint-config-next": "^13.3.0",
    "next": "^13.3.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  }
}

@archit-io
Copy link

I downloaded and installed nvm (node version manager). And then in my project I downgraded the node version to 16.14.2 (from 18.) using the command: nvm use 16.14.2

After the above change the error has gone and it's working for me.

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