-
Notifications
You must be signed in to change notification settings - Fork 86
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
Builds error when using next's i18n due to lack of serverless/pages/index.html
file
#75
Comments
Same issue here |
hey yall! @neefrehman @cantyjeffrey our i18n PR in next-on-netlify was merged and released this past sunday netlify/next-on-netlify#75. i will go ahead and upgrade the plugin's next-on-netlify version now. admittedly, we need a better workflow for keeping the plugin up to date with next-on-netlify updates. thank you for your patience!!! |
update: i upgraded the next-on-netlify version and re-released the plugin. i18n should work now in plugin version 1.0.4! |
@lindsaylevine thanks for the update! I've just tried deploying my site with the new plugin and am getting a similar error. It looks like the plugin is searching for the entry point at 10:52:20 AM: ────────────────────────────────────────────────────────────────
10:52:20 AM: Plugin "@netlify/plugin-nextjs" internal error
10:52:20 AM: ────────────────────────────────────────────────────────────────
10:52:20 AM:
10:52:20 AM: Error message
10:52:20 AM: Error: ENOENT: no such file or directory, stat '.next/serverless/pages/en/.html'
10:52:20 AM:
10:52:20 AM: Plugin details
10:52:20 AM: Package: @netlify/plugin-nextjs
10:52:20 AM: Version: 1.0.4
10:52:20 AM: Repository: git+https://github.com/netlify/netlify-plugin-nextjs.git
10:52:20 AM: npm link: https://www.npmjs.com/package/@netlify/plugin-nextjs
10:52:20 AM: Report issues: https://github.com/netlify/netlify-plugin-nextjs/issues |
oh no what page type is your index!? @neefrehman thats so odd after my thorough testing 🤔 |
actually thats really not odd i had opened this issue for myself 😭 netlify/next-on-netlify#122 |
hah! well if it's still useful my index page is just a standard |
im able to repro, ill keep ya updated. apologies! |
i believe this is the fix netlify/next-on-netlify#131 now just need to go through the re-release of everything 😅 btw when i asked for page type (sorry that was unclear) i meant are you using getStaticProps (likely since the build is looking for html) and are you using fallback and/or revalidate |
Ah understood! Yes it's a |
@neefrehman ok 1.0.5 is released now. hopefully you have a clean build and functioning i18n with this version! 🙏 |
I've actually just tried a build! It's moving past the old error, but now I'm getting the below error regarding function bundling. I guess the important piece is : I'm not sure if this is related? 11:35:56 AM: ────────────────────────────────────────────────────────────────
11:35:56 AM: Dependencies installation error
11:35:56 AM: ────────────────────────────────────────────────────────────────
11:35:56 AM:
11:35:56 AM: Error message
11:35:56 AM: A Netlify Function failed to require one of its dependencies.
11:35:56 AM: 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.
11:35:56 AM:
11:35:56 AM: In file "/opt/build/repo/netlify-automatic-functions/next_index/next_index.js"
11:35:56 AM: Cannot find module 'critters'
11:35:56 AM: Require stack:
11:35:56 AM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/node_dependencies/resolve.js
11:35:56 AM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/node_dependencies/index.js
11:35:56 AM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/main.js
11:35:56 AM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins_core/functions/index.js
11:35:56 AM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/commands/get.js
11:35:56 AM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/core/main.js
11:35:56 AM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/core/bin.js
11:35:56 AM:
11:35:56 AM: Resolved config
11:35:56 AM: build:
11:35:56 AM: command: npm run build
11:35:56 AM: commandOrigin: config
11:35:56 AM: environment:
11:35:56 AM: - NODE_VERSION
11:35:56 AM: publish: /opt/build/repo/out
11:35:56 AM: plugins:
11:35:56 AM: - inputs: {}
11:35:56 AM: origin: config
11:35:56 AM: package: netlify-plugin-cache-nextjs
11:35:56 AM: - inputs: {}
11:35:56 AM: origin: config
11:35:56 AM: package: '@netlify/plugin-nextjs' |
oh dear. this is a known issue as well! see: https://twitter.com/erikras/status/1341783510055567361?s=20 and netlify/next-on-netlify#103 temporary fix is to install |
also, best to reply on netlify/next-on-netlify#103 if you can! regarding critters. if i18n is all good for you here, i'll close this issue :) |
@lindsaylevine sorry for opening another issue again, but I've just updated the plugin to fix the resurfaced More info: 11:34:25 AM: ────────────────────────────────────────────────────────────────
11:34:25 AM: Plugin "@netlify/plugin-nextjs" internal error
11:34:25 AM: ────────────────────────────────────────────────────────────────
11:34:25 AM:
11:34:25 AM: Error message
11:34:25 AM: Error: ENOENT: no such file or directory, stat '.next/serverless/pages/en/en.html'
11:34:25 AM:
11:34:25 AM: Plugin details
11:34:25 AM: Package: @netlify/plugin-nextjs
11:34:25 AM: Version: 1.1.0
11:34:25 AM: Repository: git+https://github.com/netlify/netlify-plugin-nextjs.git
11:34:25 AM: npm link: https://www.npmjs.com/package/@netlify/plugin-nextjs
11:34:25 AM: Report issues: https://github.com/netlify/netlify-plugin-nextjs/issues |
@neefrehman don't be sorry at all!!! yikes, that's not good though @ bug. let me try to repro. |
repro'd, stay tuned |
this issue is haunting me netlify/next-on-netlify#122 |
i assume you're using next 10.0.6 because something definitely changed internally :rip: |
aight, i know what's going on. are you blocked by this? if so, i think the workaround is to downgrade next until i can release a fix |
great! i'm not blocked, so happy to downgrade for now. it must be a big challenge to continue covering all cases |
this was just released! let me know if you continue to have any issues! |
I'm trying to move a Next.js site (which uses next's i18n routing) over to Netlify, but sadly can't due to this error:
It's true that this file doesn't exist. Instead, the default homepage can be found at '.next/serverless/pages/en/index.html' (replacing "en" with whatever default locale is set in next.config.js).
It would be great to detect if i18n is in use, and then get the homepage's file location by reading the default locale.
The text was updated successfully, but these errors were encountered: