Can't launch a Next.js 15 RC React 19 RC app

Here’s where the launch gets stuck.

installing: npm install @flydotio/dockerfile@latest --save-dev
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: framer-motion@12.0.0-alpha.0
npm error Found: react@19.0.0-rc-f994737d14-20240522
npm error node_modules/react
npm error   peer react@"19.0.0-rc-f994737d14-20240522" from next@15.0.0-rc.0
npm error   node_modules/next
npm error     next@"15.0.0-rc.0" from the root project
npm error   peer react@"19.0.0-rc-f994737d14-20240522" from react-dom@19.0.0-rc-f994737d14-20240522
npm error   node_modules/react-dom
npm error     peer react-dom@"19.0.0-rc-f994737d14-20240522" from next@15.0.0-rc.0
npm error     node_modules/next
npm error       next@"15.0.0-rc.0" from the root project
npm error     react-dom@"19.0.0-rc-f994737d14-20240522" from the root project
npm error   2 more (styled-jsx, the root project)
npm error
npm error Could not resolve dependency:
npm error peerOptional react@"^18.0.0" from framer-motion@12.0.0-alpha.0
npm error node_modules/framer-motion
npm error   framer-motion@"^12.0.0-alpha.0" from the root project
npm error
npm error Conflicting peer dependency: react@18.3.1
npm error node_modules/react
npm error   peerOptional react@"^18.0.0" from framer-motion@12.0.0-alpha.0
npm error   node_modules/framer-motion
npm error     framer-motion@"^12.0.0-alpha.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
...
Error: failed to install @flydotio/dockerfile: exit status 1

Basically, since this is a release candidate, I’ve had to use --force to install Framer Motion and other packages, but I don’t have access to doing the same doing the launch process. Any idea how I could fix this?

You can modify your Dockerfile to include --legacy-peer-deps. The following command will help you through that process:

npx @flydotio/dockerfile --legacy-peer-deps

The problem is the process stops before a Dockerfile is even created. But I think what I can try is to use --legacy-peer-deps instead of --force in my project before I launch it.

Does this work for you?

npm install @flydotio/dockerfile --save-dev --legacy-peer-deps

If so, try fly launch again after running that command.

1 Like

Everything’s going good so far…

It failed again for the same reasons.

=> CACHED [build 2/6] COPY --link package-lock.json package.json ./       0.0s
 => ERROR [build 3/6] RUN npm ci --include=dev                             1.4s
------                                                                          
 > [build 3/6] RUN npm ci --include=dev:
1.360 npm notice 
1.360 npm notice New minor version of npm available! 10.1.0 -> 10.8.2
1.361 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.8.2>
1.361 npm notice Run `npm install -g npm@10.8.2` to update!
1.361 npm notice 
1.363 npm ERR! code ERESOLVE
1.366 npm ERR! ERESOLVE could not resolve
1.366 npm ERR! 
1.366 npm ERR! While resolving: framer-motion@12.0.0-alpha.0
1.366 npm ERR! Found: react@19.0.0-rc-f994737d14-20240522
1.366 npm ERR! node_modules/react
1.366 npm ERR!   react@"19.0.0-rc-f994737d14-20240522" from the root project
1.366 npm ERR!   peer react@"19.0.0-rc-f994737d14-20240522" from next@15.0.0-rc.0
1.366 npm ERR!   node_modules/next
1.366 npm ERR!     next@"15.0.0-rc.0" from the root project
1.366 npm ERR!   2 more (react-dom, styled-jsx)
1.366 npm ERR! 
1.366 npm ERR! Could not resolve dependency:
1.366 npm ERR! peerOptional react@"^18.0.0" from framer-motion@12.0.0-alpha.0
1.366 npm ERR! node_modules/framer-motion
1.366 npm ERR!   framer-motion@"^12.0.0-alpha.0" from the root project
1.366 npm ERR! 
1.366 npm ERR! Conflicting peer dependency: react@18.3.1
1.366 npm ERR! node_modules/react
1.367 npm ERR!   peerOptional react@"^18.0.0" from framer-motion@12.0.0-alpha.0
1.367 npm ERR!   node_modules/framer-motion
1.367 npm ERR!     framer-motion@"^12.0.0-alpha.0" from the root project
1.367 npm ERR! 
1.367 npm ERR! Fix the upstream dependency conflict, or retry
1.367 npm ERR! this command with --force or --legacy-peer-deps
1.367 npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
1.367 npm ERR! 
1.367 npm ERR! 
1.367 npm ERR! For a full report see:
1.367 npm ERR! /root/.npm/_logs/2024-07-23T11_48_21_787Z-eresolve-report.txt
1.370 
1.370 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-07-23T11_48_21_787Z-debug-0.log
------
Error: failed to fetch an image or build from source: error building: failed to solve: process "/bin/sh -c npm ci --include=dev" did not complete successfully: exit code: 1

Maybe that’s the part where I should do the same thing on the Dockerfile?

Here’s where I am so far, I’ll try deplying again right now.

framer-motion-recipes % npx @flydotio/dockerfile --legacy-peer-deps
   conflict  Dockerfile
Overwrite /Users/Luther/Code/framer-motion-recipes/Dockerfile? (enter "h" for help) [Ynaqdh] h
        Y - yes, overwrite
        n - no, do not overwrite
        a - all, overwrite this and all others
        q - quit, abort
        d - diff, show the differences between the old and the new
        h - help, show this help
Overwrite /Users/Luther/Code/framer-motion-recipes/Dockerfile? (enter "h" for help) [Ynaqdh] y
      force  Dockerfile

I pressed y to overwrite the Dockerfile.

It all works now. Thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.