This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Isn't showing anything when executing the following command

Trying to execute the following command. It isn't showing anything 

ubuntu@ip-172-31-25-55:~/aws$ npx cdk -a 'node dist/cdk/cloudformation-sourcecode.js' deploy

Parents Reply Children
  • Just to make sure:

    1. you are in the `aws` directory, that contains a clone of the nRF Asset Tracker for AWS
    2. you have created the .envrc as described here.
    3. you have run `direnv allow`

    When you run

    `npx cdk -a 'node dist/cdk/cloudformation-sourcecode.js' deploy`

    no output can be observed.

    Does the command eventually time out (with which error message)?
    Or after how long do you terminate it manually?

  • I did. When I'm running the following command. I'm getting the following error.

    ubuntu@ip-172-31-25-55:~/aws$ npx cdk bootstrap
    internal/modules/cjs/loader.js:818
      throw err;
      ^
    
    Error: Cannot find module '@aws-cdk/aws-autoscaling-common'
    Require stack:
    - /home/ubuntu/aws/node_modules/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-policy.js
    - /home/ubuntu/aws/node_modules/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.js
    - /home/ubuntu/aws/node_modules/@aws-cdk/aws-applicationautoscaling/lib/base-scalable-attribute.js
    - /home/ubuntu/aws/node_modules/@aws-cdk/aws-applicationautoscaling/lib/index.js
    - /home/ubuntu/aws/node_modules/@aws-cdk/aws-lambda/lib/alias.js
    - /home/ubuntu/aws/node_modules/@aws-cdk/aws-lambda/lib/index.js
    - /home/ubuntu/aws/node_modules/@aws-cdk/custom-resources/lib/aws-custom-resource/aws-custom-resource.js
    - /home/ubuntu/aws/node_modules/@aws-cdk/custom-resources/lib/aws-custom-resource/index.js
    - /home/ubuntu/aws/node_modules/@aws-cdk/custom-resources/lib/index.js
    - /home/ubuntu/aws/node_modules/@aws-cdk/aws-cognito/lib/user-pool-domain.js
    - /home/ubuntu/aws/node_modules/@aws-cdk/aws-cognito/lib/user-pool.js
    - /home/ubuntu/aws/node_modules/@aws-cdk/aws-cognito/lib/index.js
    - /home/ubuntu/aws/dist/cdk/stacks/AssetTracker/stack.js
    - /home/ubuntu/aws/dist/cdk/apps/AssetTracker.js
    - /home/ubuntu/aws/dist/cdk/cloudformation.js
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
        at Function.Module._load (internal/modules/cjs/loader.js:667:27)
        at Module.require (internal/modules/cjs/loader.js:887:19)
        at require (internal/modules/cjs/helpers.js:74:18)
        at Object.<anonymous> (/home/ubuntu/aws/node_modules/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-policy.js:6:34)
        at Module._compile (internal/modules/cjs/loader.js:999:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
        at Module.load (internal/modules/cjs/loader.js:863:32)
        at Function.Module._load (internal/modules/cjs/loader.js:708:14)
        at Module.require (internal/modules/cjs/loader.js:887:19) {
      code: 'MODULE_NOT_FOUND',
      requireStack: [
        '/home/ubuntu/aws/node_modules/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-policy.js',
        '/home/ubuntu/aws/node_modules/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.js',
        '/home/ubuntu/aws/node_modules/@aws-cdk/aws-applicationautoscaling/lib/base-scalable-attribute.js',
        '/home/ubuntu/aws/node_modules/@aws-cdk/aws-applicationautoscaling/lib/index.js',
        '/home/ubuntu/aws/node_modules/@aws-cdk/aws-lambda/lib/alias.js',
        '/home/ubuntu/aws/node_modules/@aws-cdk/aws-lambda/lib/index.js',
        '/home/ubuntu/aws/node_modules/@aws-cdk/custom-resources/lib/aws-custom-resource/aws-custom-resource.js',
        '/home/ubuntu/aws/node_modules/@aws-cdk/custom-resources/lib/aws-custom-resource/index.js',
        '/home/ubuntu/aws/node_modules/@aws-cdk/custom-resources/lib/index.js',
        '/home/ubuntu/aws/node_modules/@aws-cdk/aws-cognito/lib/user-pool-domain.js',
        '/home/ubuntu/aws/node_modules/@aws-cdk/aws-cognito/lib/user-pool.js',
        '/home/ubuntu/aws/node_modules/@aws-cdk/aws-cognito/lib/index.js',
        '/home/ubuntu/aws/dist/cdk/stacks/AssetTracker/stack.js',
        '/home/ubuntu/aws/dist/cdk/apps/AssetTracker.js',
        '/home/ubuntu/aws/dist/cdk/cloudformation.js'
      ]
    }
    Subprocess exited with error 1
    

  • Progress!

    Did you install the dependencies, using `npm ci`? Before you run `npm ci`, please make  that you have npm version 7, as documented here

  • Markus,

    I installed the npm ci. I misspelled the command. I executed the node cli info -o mqttEndpoint

    Could you let me know how to set the CONFIG_AWS_IOT_BROKER_HOST_NAME?

Related