Problem when installing - "next not found"
See original GitHub issueHi,
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:
- Created 2 years ago
- Reactions:1
- Comments:8 (2 by maintainers)

Top Related StackOverflow Question
Was able to npm i with the addition of --legacy-peer-deps
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” } }