-
Notifications
You must be signed in to change notification settings - Fork 67
next-on-netlify
fails to build peer dependencies in deployment
#103
Comments
hey @lqze! so sorry you're running into this. it's definitely an issue we've seen around. can you try change your target in next.config.js to |
@lindsaylevine All good, I'll try get a minimal repo set up that brings up the issue. Thanks. |
@lqze hey caleb any update here? |
@lindsaylevine Hello, sorry have not had a moment in the past week to spin up a minimal reproduction repo. I am working on one now. On another note, adding the peer dependencies to the top level
and the build failing thereof. |
@lindsaylevine Quick update nonetheless, I don't believe it is directly related to I've managed to make a very small repo which had the base |
@lqze yes should be the exact same with the one-click. hm i just skimmed your dependencies in the original post and not sure which would cause the react-native complaint. thanks for the update, will wait to see what you discover! |
The
This is what appears in the |
@lqze oh ok but the minimal project still built without error with react-spring installed right? per your second-to-last comment. v interesting |
Exactly. Even with the exact same |
@lqze :( sorry it's such a pain to figure out. wish i could help more at this moment! D: good luck 🙏 |
additional context: someone posted on twitter a very similar issue if not the exact same issue and they were able to reply with their source: https://github.com/erikras/happyhourfm that is mainly a note for me but if i'm able to clone that and deploy/repro myself that might enable me to move forward on your issue caleb |
I can see we are both using styled-components and styled-normalise. I wonder if it's only correlation? On another note, is it possible to get additional debugging output through the Netlify CLI? I.e., could I run next-on-netlify locally and attach a debugger? |
hey @lindsaylevine. just continuing the conversation from opennextjs/opennextjs-netlify#75 (comment). going from 'serverless' to 'experimental-serverless-trace' in my next config didn't solve the build issue, but adding |
@neefrehman cool thanks for trying that. lines up with caleb's issue. trying to loop in some others from the build team at netlify to hopefully get this figured out sooner rather than later! |
@lqze if you make changes to node_modules/next-on-netlify they should output on a CLI build. as far as general CLI debugging goes, @erezrokah may have more insight there 🙏 |
You can run Is the current status that the build fails or that functions are too big? |
@erezrokah their functions fail on bundling and the build fails. for both neefrehman and erikras, their bundles fail on caleb's fails on |
@erezrokah and yes! we have happyhourfm as a repo that reproduces critters, thats it. |
Reported on Next.js repo too vercel/next.js#20742 and related to netlify/zip-it-and-ship-it#68. It was added recently |
Hello 👋 A fix to the missing Unless we can get a reproduction for the |
@erezrokah thanks so much for the build/CLI fix!!! i agree we can close : ) @lqze please feel free to re-open if you have end up having a repro and need more of our help! |
@lindsaylevine hello! Sorry for bringing it up again but I'm the Works fine again when I re-install it as a devDependency, but just thought I'd bring it to your attention. 1:06:49 PM: ────────────────────────────────────────────────────────────────
1:06:49 PM: Dependencies installation error
1:06:49 PM: ────────────────────────────────────────────────────────────────
1:06:49 PM: Error message
1:06:49 PM: A Netlify Function failed to require one of its dependencies.
1:06:49 PM: If the dependency is a Node module, please make sure it is present in the site's top-level "package.json".
If it is a local file instead, please make sure the file exists and its filename is correctly spelled.
1:06:49 PM:
1:06:49 PM: In file "/opt/build/repo/netlify-automatic-functions/next_country/next_country.js"
1:06:49 PM: Cannot find module 'critters' |
thank you for surfacing. i tagged @erezrokah in slack for tomorrow! |
@neefrehman do you have a link to the deploy that failed? (doesnt need to be public) |
@neefrehman ah wait just realized you're using the CLI (i think) |
i'm gonna re-close after transferring the plugin issue to NoN. let's track there since some back and forth has started. |
The following error occurs.
This occurs despite adding the required packages it specifies in the top levelpackage.json
.Update: Adding all packages via
npm i
to top levelpackage.json
seems to resolve, however build-size becomes too large for Netlify's lambdas to succeed.I'm using
react-spring
with TypeScript, I believe this is an issue with the types for react-spring potentiallyFYI. Build works normally when using the build command
next build && next export
as if the site was 100% static.It's as if it cant resolve any deps or something in the opt folder? Or it's not able to correctly path to it?
My package.json is the following:
I've removed the
konva
from above after not getting any further.I know konva is a dep of
react-spring
, particularlyThe text was updated successfully, but these errors were encountered: