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

migrate does not work with higher version of node over 16 #291

Open
lukaskiss222 opened this issue Feb 16, 2023 · 4 comments
Open

migrate does not work with higher version of node over 16 #291

lukaskiss222 opened this issue Feb 16, 2023 · 4 comments

Comments

@lukaskiss222
Copy link

https://stackoverflow.com/questions/71799147/serverless-offline-dynamodb-throws-local-unknownendpoint-inaccessible-host-l

@bernier
Copy link

bernier commented Mar 7, 2023

After getting the new message, "We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023." I decided to migrate my app to AWS SDK v3, it was a lot of work, but I was happy to be able to use Node 18 finally. Just to found out that this plugin is not supporting it :(

Do you know if any fixes are coming soon? Looks like we're getting this issue when the migrate or seed options are set to true in serverless.yml

@mrded
Copy link

mrded commented Mar 31, 2023

I run on node v16.19.1 in Github actions and missing dynamodb migrate command:

npx serverless help
...
ServerlessDynamodbLocal
dynamodb                        
dynamodb create                 
dynamodb execute                
dynamodb executeAll             
dynamodb start                  
dynamodb remove                 
dynamodb install  
> serverless dynamodb migrate
Environment: linux, node 16.19.1, framework 3.28.1 (local), plugin 6.2.3, SDK 4.3.2
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
Serverless command "dynamodb migrate" not found. Run "serverless help" for a list of all available commands.

1 deprecation found: run 'serverless doctor' for more details
Error: Process completed with exit code 1.

Locally, on the same node version, or even v18 I can see serverless dynamodb migrate, and it works just fine.

Here is my config:

jobs:
 test:
  runs-on: ubuntu-latest
  steps:
    - uses: actions/checkout@v3
    - name: Setup local DynamoDB
      run: docker run -d -p 8000:8000 amazon/dynamodb-local
    - uses: actions/setup-node@v3
      with:
        node-version: 16
    - run: npm i
    - run: npx serverless dynamodb migrate

Any ideas?

@mrded
Copy link

mrded commented Mar 31, 2023

Aha! it's probably because serverless dynamodb migrate has been quietly replaced with serverless dynamodb create

@bernier
Copy link

bernier commented Apr 7, 2023

Just to be clear, I'm speaking about the options from serverless.yml

dynamodb:
  stages:
    - 'local'
  start:
    port: 8000
    inMemory: true
    heapInitial: 200m
    heapMax: 1g
    migrate: true
    seed: true
    convertEmptyValues: true

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

3 participants