Open kacperaniolek opened 3 years ago
Hm I'm not sure quite sure why that's that would be the case, could you provide a sample repo to demonstrate the issue? Though as a workaround for now, you could always run with inputs.build: false
and run just the packaging/deploy part
Issue Summary
Building with
serverless
results in an error:whereas regular
yarn build
/node_modules/.bin/next build
works fine.Actual behavior
serverless
fails while building the project, suggesting there is a circular dependency with:The
pages/...js:...:..
part differs from trial to trial, ie. it seems that no matter what page it is, serverless will complain.Expected behavior
The project is built and ready for deployment.
Steps to reproduce
node:14-alpine
based image with the project files and its dependencies up and running.serverless.yml
in the project rootnpm install -g serverless
in the containerserverless
Screenshots/Code/Configuration/Logs
/app/.next/serverless/chunks/9643.js:21190:46
:Dockerfile
:serverless.yml
:tsconfig.json
:serverless --debug
output:Versions
Additional context
It seems the error is related to our internal dependency (that
chunks...
lines are the ones using our libs), but what is suprising, it builds successfully with a regularnext build
.Checklist
latest
oralpha
@sls-next/serverless-component
release version, which may have already fixed your issue or implemented the feature you are trying to use. Note that the oldserverless-next.js
component and theserverless-next.js
plugin are deprecated and no longer maintained.