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

Unsupported runtime: provider.runtime node14.x #1187

Closed
derek-lewis opened this issue Feb 26, 2021 · 14 comments
Closed

Unsupported runtime: provider.runtime node14.x #1187

derek-lewis opened this issue Feb 26, 2021 · 14 comments

Comments

@derek-lewis
Copy link

derek-lewis commented Feb 26, 2021

When can we expect support for node14.x...
Thank you.

@derek-lewis
Copy link
Author

do you know of any temp workarounds until this runtime is supported?

possible config override?

@rcoundon
Copy link

do you know of any temp workarounds until this runtime is supported?

possible config override?

Worth looking through this - #1170 there's a workaround in the conversation.

@micheleangioni
Copy link

Check also #1172

@chrisbbreuer
Copy link

The support is already there, so you could already use it.

Temp fix by adjusting your package.json:

"serverless-offline": "github:dhe4rault/serverless-offline#master",

and then just run npm install once more.

Depending on the breaking changes in master, if any, this may just need a new version tag. 👍🏼

@micheleangioni
Copy link

@chris1904 this is absolutely not a good practice, as any further commit pushed to master could brake your application. We need a new version tag :)

@chrisbbreuer
Copy link

chrisbbreuer commented Mar 8, 2021

This is a development tool, not one used for production or build-purposes. It will not break your application. In case the serverless-offline functionality does not behave the norm anymore, revert to the commit that didn't. But this problem does not exist atm. This practice is totally fine as an intermediary solution.

@mattcat10
Copy link

any updates on creating a release with node 14 support?

@tobeno
Copy link

tobeno commented Mar 19, 2021

@chris1904 Tried it with the temporary solution, but sadly the Git repository does not include the dist files. So NPM just installs an absolutely useless skeleton with neither src nor dist files. So a direct install of the Git repo is not an option at all to fix this issue. At least I could not get it to work this way. You would actually need to clone it manually into the node_modules folder and build it yourself. Not really a viable option.
Open to other ideas in case I'm doing something wrong with the Git install.

In case this helps anybody, I solved it for now by just using a rather hacky approach in the serverless.ts file:

const isOffline = process.argv.includes('offline');

const serverlessConfig: AWS = {
  // ...
  provider: {
    name: 'aws',
    runtime: isOffline ? 'nodejs12.x' : 'nodejs14.x', // Offline we need to set this to 12 because serverless-offline did not update their package yet -> https://github.com/dherault/serverless-offline/issues/1187
// ...

Good thing is that serverless-offline does not really care about the runtime as far as I see it. So you can run it on NodeJS 14 with the runtime set to NodeJS 12. Not nice but works as a quickfix.

But this really needs a fix soon. NodeJS 12 is in maintenance mode which means more and more will want to switch for NodeJS 14. See: https://nodejs.org/en/about/releases/

@markhker
Copy link

This is solved with the latest tag release: 6.9.0

@micheleangioni
Copy link

Yep, this issue is old, it should be closed

@lucasmarcelli
Copy link

upgrading to 6.9.0 did not fix this issue for me.

@pgrzesik
Copy link
Collaborator

Hello @lucasmarcelli, what error do you still experience?

@lucasmarcelli
Copy link

Turns out there was an issue with a yarn cache, it's actually fixed. Sorry about that x_x.

@pgrzesik
Copy link
Collaborator

Thanks for the clarification @lucasmarcelli, I'm going to close this one

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

9 participants