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

Windows: Serverless command "dynamodb install" not found. #266

Open
eduard93 opened this issue Apr 2, 2021 · 8 comments
Open

Windows: Serverless command "dynamodb install" not found. #266

eduard93 opened this issue Apr 2, 2021 · 8 comments

Comments

@eduard93
Copy link

eduard93 commented Apr 2, 2021

Actual Behaviour

sls dynamodb install yields:

>sls dynamodb install
Serverless: Running "serverless" installed locally (in service node_modules)

  Serverless Error ---------------------------------------

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

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          win32
     Node Version:              15.8.0
     Framework Version:         1.71.3
     Plugin Version:            3.8.4
     SDK Version:               2.3.2
     Components Version:        2.30.11

I have installed serverless-dynamodb-local plugin, and serverless help shows it:

>serverless help
Serverless: Running "serverless" installed locally (in service node_modules)

Commands
* You can run commands with "serverless" or the shortcut "sls"
* Pass "--verbose" to this command to get in-depth plugin info
* Pass "--no-color" to disable CLI colors
* Pass "--help" after any <command> for contextual help

Interactive Quickstart
* Run serverless (or shortcut sls) without any arguments to initialize an interactive setup
  of functionalities related to given service or current environment
* Pass "--help-interactive" for contextual help on interactive CLI options

Framework
* Documentation: http://slss.io/docs

Environment Variables
* Set SLS_DEBUG=* to see debugging logs
* Set SLS_WARNING_DISABLE=* to hide warnings from the output
* Set SLS_MAX_CONCURRENT_ARTIFACTS_UPLOADS to control the maximum S3 upload SDK requests that are sent in parallel during the deployment of the service's artifacts. The default is 3. Note: increasing this too high might, actually, downgrade the overall upload speed

config ........................ Configure Serverless
config credentials ............ Configures a new provider profile for the Serverless Framework
create ........................ Create new Serverless service
install ....................... Install a Serverless service from GitHub or a plugin from the Serverless registry
package ....................... Packages a Serverless service
deploy ........................ Deploy a Serverless service
deploy function ............... Deploy a single function from the service
deploy list ................... List deployed version of your Serverless Service
deploy list functions ......... List all the deployed functions and their versions
invoke ........................ Invoke a deployed function
invoke local .................. Invoke function locally
info .......................... Display information about the service
logs .......................... Output the logs of a deployed function
metrics ....................... Show metrics for a specific function
print ......................... Print your compiled and resolved config file
remove ........................ Remove Serverless service and all resources
rollback ...................... Rollback the Serverless service to a specific deployment
rollback function ............. Rollback the function to a specific version
slstats ....................... Enable or disable stats
plugin ........................ Plugin management for Serverless
plugin install ................ Install and add a plugin to your service
plugin uninstall .............. Uninstall and remove a plugin from your service
plugin list ................... Lists all available plugins
plugin search ................. Search for plugins
s3deploy ...................... Deploy assets to S3 bucket
requirements .................. Serverless plugin to bundle Python packages
requirements clean ............ Remove .requirements and requirements.zip
requirements install .......... install requirements manually
requirements cleanCache ....... Removes all items in the pip download/static cache (if present)
client ........................ Generate and deploy clients
client deploy ................. Deploy serverless client code
client remove ................. Removes deployed files and bucket
dynamodb ...................... undefined
dynamodb migrate .............. Creates local DynamoDB tables from the current Serverless configuration
dynamodb seed ................. Seeds local DynamoDB tables with data
dynamodb start ................ Starts local DynamoDB
dynamodb remove ............... Removes local DynamoDB
dynamodb install .............. Installs local DynamoDB
offline ....................... Simulates API Gateway to call your lambda functions offline.
offline start ................. Simulates API Gateway to call your lambda functions offline using backward compatible initialization.
login ......................... Login or sign up for Serverless
logout ........................ Logout from Serverless
generate-event ................ Generate event
test .......................... Run HTTP tests
dashboard ..................... Open the Serverless dashboard
output ........................
output get .................... Get value of dashboard deployment profile parameter
output list ................... List all dashboard deployment profile parameters
param .........................
param get ..................... Get value of dashboard service output
param list .................... List all dashboard service outputs
studio ........................ Develop a Serverless application in the cloud.

Plugins
Assets, AwsCommon, AwsCompileAlbEvents, AwsCompileAlexaSkillEvents, AwsCompileAlexaSmartHomeEvents, AwsCompileApigEvents, AwsCompileCloudFrontEvents, AwsCompileCloudWatchEventEvents, AwsCompileCloudWatchLogEvents, AwsCompileCognitoUserPoolEvents, AwsCompileEventBridgeEvents, AwsCompileFunctions, AwsCompileIoTEvents, AwsCompileLayers, AwsCompileS3Events, AwsCompileSNSEvents, AwsCompileSQSEvents, AwsCompileScheduledEvents, AwsCompileStreamEvents, AwsCompileWebsockets, AwsConfigCredentials, AwsDeploy, AwsDeployFunction, AwsDeployList, AwsInfo, AwsInvoke, AwsInvokeLocal, AwsLogs, AwsMetrics, AwsPackage, AwsProvider, AwsRemove, AwsRollback, AwsRollbackFunction, Config, Create, Deploy, Executable, HttpApiEvents, Info, Install, InteractiveCli, Invoke, Logs, Metrics, Package, Plugin, PluginInstall, PluginList, PluginSearch, PluginUninstall, Print, Remove, Rollback, ServerlessDynamodbLocal, ServerlessEnterprisePlugin, ServerlessFullstackPlugin, ServerlessOffline, ServerlessPythonRequirements, SlStats

Expected Behaviour

DynamoDB installs.

Tried workarounds

Here's a similar issue and the solution was to install local dynamodb like this:

serverless plugin install --name serverless-dynamodb-local

I tried that too, but it didn't help. I see serverless-dynamodb-local in local node_modules:

image

Environment

This is Windows 10, my path is:

C:\Users\eduard\AppData\Local\Programs\Python\Python38;C:\Users\eduard\AppData\Local\Programs\Python\Python38\Scripts\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\nodejs\;C:\Users\eduard\AppData\Roaming\npm\;C:\temp\fhirsvcs\portal\node_modules\.bin;C:\temp\fhirsvcs\portal

And relevant part of serverless.yml:

plugins:
  - serverless-s3-deploy
  - serverless-python-requirements
  - fullstack-serverless
  - serverless-dynamodb-local
  - serverless-offline
@eduard93
Copy link
Author

eduard93 commented Apr 8, 2021

Same on wsl2

@eduard93
Copy link
Author

eduard93 commented Apr 9, 2021

Same in docker

root@ide:~# cd localsrc/
root@ide:~/localsrc# serverless plugin install --name serverless-dynamodb-local
Serverless: Running "serverless" installed locally (in service node_modules)
Serverless: Installing plugin "serverless-dynamodb-local@latest" (this might take a few seconds...)
Serverless: Successfully installed "serverless-dynamodb-local@latest"
root@ide:~/localsrc# sls dynamodb install
Serverless: Running "serverless" installed locally (in service node_modules)

  Serverless Error ---------------------------------------

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

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          linux
     Node Version:              15.14.0
     Framework Version:         1.71.3
     Plugin Version:            3.8.4
     SDK Version:               2.3.2
     Components Version:        2.30.11

root@ide:~/localsrc#

@hsteckylf
Copy link

Looking for a solution as I am running into the same issue. Tried all the above as well with no luck yet.

@rharper12
Copy link

rharper12 commented Apr 13, 2021

Hey guys, I was having the exact same issue. What I had to do was downgrade my serverless version to an older version and then it worked for me. You don't have to go back this far but I did.

$ sudo npm install -g serverless@1.72.0
$ serverless -v

Framework Core: 1.72.0
Plugin: 3.8.4
SDK: 2.3.2
Components: 2.34.9

@eduard93
Copy link
Author

Plugin also must be installed globally:

npm install -g serverless-dynamodb-local

@eduard93
Copy link
Author

Also does not help on linux. Tried downgrade, local and global reinstall, no dice.

@rashikaHali
Copy link

This package needs serverless 1.x version for sls dynamodb install command to work and Java Runtime Engine (JRE) version 6.x or newer so you can do: npm install -g serverless-dynamodb-local@1.67.0 or yarn global add serverless-dynamodb-local@1.67.0

@majindageta
Copy link

I had the same issue and was a trivial answer: serverless/serverless#5426 (comment)
just rename the yml file to "serverless.yml"

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

5 participants