-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Bug] Serverless Deployement #2
Comments
I get the same error when using |
If the dev happens to come along here:
Errors will show:
|
Iam interested to to resolve this bug. |
I had the problem with another project. My way to solve this was: _app.tsx -> add following after your imports:
|
Hello guys, Sorry for this late reply, I do not know why Github never notified me about this issue. Best, |
Hello again, guys, @carlfedak @dvalle-nearsoft @labedal , I've managed to solve this.
From outside of the components, to inside of them, so for example this file
To
So, I just moved
And that it is. You are good to go. These days, not sure if today, tomorrow, or on Monday (1st of February 2021), I'll release a new version with the above changes. Best, |
Version
1.0.0
Reproduction link
http://n.a
Operating System
osx
Device
macbook pro
Browser & Version
n/a
Steps to reproduce
Trying to deploy with serverless framework. Have only unzipped project, no code changes:
Unzip project
npm install
Initialize serverless framework project in same directory
Edit serverless.yml file to have only the following:
creativeTimTest:
component: "@sls-next/[email protected]"
execute command "serverless"
What is expected?
Deployed to AWS
What is actually happening?
Error: Command failed with exit code 1: node_modules/.bin/next build
Warning: Built-in CSS support is being disabled due to custom CSS configuration being detected.
See here for more info: https://err.sh/next.js/built-in-css-disabled
warn - Compiled with warnings
./node_modules/next/dist/next-server/server/load-components.js
Critical dependency: the request of a dependency is an expression
./node_modules/next/dist/next-server/server/load-components.js
Critical dependency: the request of a dependency is an expression
./node_modules/next/dist/next-server/server/require.js
Critical dependency: the request of a dependency is an expression
./node_modules/next/dist/next-server/server/require.js
Critical dependency: the request of a dependency is an expression
./node_modules/next/dist/next-server/server/require.js
Critical dependency: the request of a dependency is an expression
Warning: You have opted-out of Automatic Static Optimization due to
getInitialProps
inpages/_app
. This does not opt-out pages withgetStaticProps
Read more: https://err.sh/next.js/opt-out-auto-static-optimization
Solution
Additional comments
I realize this isn't necessarily part of your template but help would be appreciated. I CAN do the above with a simple:
I believe this is something that is being used in the grid-system.js file (and most/all of the files in the pages/admin directory), as a test I deleted that and the next one triggered was full-screen-maps.js, followed by google-maps.js (all in the admin page directory). If I scrap that whole directory (pages/admin) then it works fine, output similar to this:
creativeTimTest:
appUrl: https://myURL
bucketName:
distributionId:
64s › creativeTimTest › done
Any advice would be greatly appreciated.
The text was updated successfully, but these errors were encountered: