question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem when installing - "next not found"

See original GitHub issue

Hi,

I’m trying to install react-three-next When installation. I’m following the steps:

$ npx create-r3f-app next my-app
$ cd my-app
$ npm run dev

And it returns the next:

> react-three-next@2.0.0 dev > next dev

sh: 1: next: not found

So inside of my-app I did:

> npm install

and it returns:

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: react-three-next@2.0.0 npm ERR! Found: react@18.0.0-alpha-dbe3363cc npm ERR! node_modules/react npm ERR! react@“^18.0.0-alpha-dbe3363cc” from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@“>=17.0” from @react-three/fiber@7.0.6 npm ERR! node_modules/@react-three/fiber npm ERR! @react-three/fiber@“^7.0.6” from the root project npm ERR! peer @react-three/fiber@“>=6.0” from @react-three/a11y@2.1.0 npm ERR! node_modules/@react-three/a11y npm ERR! @react-three/a11y@“^2.1.0” from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See /home/spacecomet/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR! /home/spacecomet/.npm/_logs/2021-09-01T20_21_29_342Z-debug.log

Any ideas why this happens. I’m not able to use this package…

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Mognoid3rcommented, Sep 8, 2021

Was able to npm i with the addition of --legacy-peer-deps

0reactions
S-hissamcommented, Jun 11, 2022

Hi everybody,

I solved the problem by removing the eslint:‘8’ from devdependencies and I also removed eslint from dependencies. Because in Nextjs version 12 eslint is mixed in some way.

with : npm run dev its working without any error now!

Here is my packages.json file:

{ “name”: “react-three-next”, “version”: “2.0.0”, “authors”: [ “Renaud ROHLINGER https://twitter.com/onirenaud” ], “license”: “MIT”, “private”: true, “engines”: { “node”: “>=14” }, “scripts”: { “lint”: “yarn prettier && yarn eslint”, “eslint”: “next lint --fix --dir src”, “prettier”: “prettier -l "./src/**/*.{js,jsx,md}"”, “dev”: “next dev”, “build”: “next build”, “export”: “EXPORT=true next build && EXPORT=true next export”, “analyze”: “ANALYZE=true next build”, “start”: “next start” }, “dependencies”: { “@babel/plugin-transform-runtime”: “^7.17.0”, “@react-three/drei”: “^9.11.2”, “@react-three/fiber”: “^8.0.19”, “babel-plugin-glsl”: “^1.0.0”, “glsl-random”: “^0.0.5”, “next”: “^12.1.6”, “react”: “^18.1.0”, “react-dom”: “^18.1.0”, “three”: “^0.140.2”, “three-stdlib”: “^2.10.1”, “zustand”: “^4.0.0-rc.1” }, “devDependencies”: { “@next/bundle-analyzer”: “^12.0.10”, “autoprefixer”: “^10.4.2”, “eslint-config-next”: “^12.0.10”, “eslint-config-prettier”: “^8.3.0”, “eslint-plugin-tailwind”: “^0.2.1”, “file-loader”: “^6.2.0”, “glslify”: “^7.1.1”, “glslify-loader”: “^2.0.0”, “next-compose-plugins”: “^2.2.1”, “next-offline”: “^5.0.5”, “postcss”: “^8.4.12”, “prettier”: “^2.6.2”, “raw-loader”: “^4.0.2”, “tailwindcss”: “^3.0.23”, “typescript”: “^4.7.3”, “url-loader”: “^4.1.1” } }

Read more comments on GitHub >

github_iconTop Results From Across the Web

I ran next build but it is saying next command not found #8945
I used this command but same problem. next build Command 'next' not found, but can be installed with: sudo apt install mailutils-mh sudo...
Read more >
module-not-found - Next.js
A module not found error can occur for many different reasons: The module you're trying to import is not installed in your dependencies;...
Read more >
next.js - "command not found: create-next-app" how do I ...
First install create-next-app globally by doing npm i -g create-next-app. After you can use create-next-app CLI to create next app.
Read more >
Next command not found : r/reactjs - Reddit
it says “command not found”, It first gives me a path to run and then it has “next Dev” but, is that what...
Read more >
npx create-next-app not working | How to install next js
next js installation problem 2022 | npx create- next -app not working | How to install next js# MLM Project Full ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found