Skip to content
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

Nextjs sst deploy fails (0.0.131) due to favicon format. #4930

Closed
bebbi opened this issue Mar 11, 2024 · 3 comments
Closed

Nextjs sst deploy fails (0.0.131) due to favicon format. #4930

bebbi opened this issue Mar 11, 2024 · 3 comments

Comments

@bebbi
Copy link

bebbi commented Mar 11, 2024

After fixing the same error as #4931 by excluding sst.config.ts in tsconfig, deploy resulted in a different error. I've upgraded to 0.0.131.

  • simple static site, next@14
  • sst dev works locally
  • nextjs build/linting works
  • But sst deploy --stage=test fails.

When I directly run npx --yes [email protected] build, the output is:

Bundling middleware function...
Bundling static assets...
Bundling cache assets...
node:fs:456
    return binding.readFileUtf8(path, stringToFlags(options.flag));
                   ^

Error: ENOENT: no such file or directory, open '/Users/bebbi/code/landing/.next/standalone/.next/server/app/icon/route.js.nft.json'
    at readFileSync (node:fs:456:20)
    at computeCopyFilesForPage (file:///Users/bebbi/.npm/_npx/243dd04f789c84f7/node_modules/open-next/dist/build/copyTracedFiles.js:39:42)
@bebbi bebbi changed the title Test sst deploy fails (0.0.131) Mar 11, 2024
@bebbi bebbi changed the title sst deploy fails (0.0.131) Nextjs sst deploy fails (0.0.131) Mar 11, 2024
@bebbi
Copy link
Author

bebbi commented Mar 11, 2024

After more playing, I replaced my icon.tsx file inside app/ with a static icon.png file.
While both are allowed in nextjs, this change did the trick and let the npx command complete.

@bebbi bebbi changed the title Nextjs sst deploy fails (0.0.131) Nextjs sst deploy fails (0.0.131) due to favicon format. Mar 11, 2024
@fwang
Copy link
Contributor

fwang commented Mar 14, 2024

Hi @bebbi, thanks for digging into this. It seems to be an issue with OpenNext. Can you open an issue here https://github.com/sst/open-next/issues?

@fwang fwang closed this as completed Mar 14, 2024
@bebbi
Copy link
Author

bebbi commented Mar 21, 2024

Maybe related to this open-next issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants