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

Lerna command in AWS Codebuild #14

Open
s1mrankaur opened this issue Mar 15, 2021 · 2 comments
Open

Lerna command in AWS Codebuild #14

s1mrankaur opened this issue Mar 15, 2021 · 2 comments

Comments

@s1mrankaur
Copy link

    Error: Cannot find module '.'
    Require stack:
    - /codebuild/output/src309915592/src/node_modules/.bin/lerna
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
        at Function.Module._load (internal/modules/cjs/loader.js:687:27)
        at Module.require (internal/modules/cjs/loader.js:903:19)
        at require (internal/modules/cjs/helpers.js:74:18)
        at Object.<anonymous> (/codebuild/output/src309915592/src/node_modules/.bin/lerna:11:3)
        at Module._compile (internal/modules/cjs/loader.js:1015:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
        at Module.load (internal/modules/cjs/loader.js:879:32)
        at Function.Module._load (internal/modules/cjs/loader.js:724:14)
        at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) {
      code: 'MODULE_NOT_FOUND',
      requireStack: [ '/codebuild/output/src309915592/src/node_modules/.bin/lerna' ]
    }

I get this error on running the test command:

lerna run --stream test --parallel Also, tried with

lerna run --stream test --parallel --scope tenant-registration-service In the services, test script looks like,

"test": "serverless-bundle test --verbose --coverage", I installed Lerna globally in the pipeline. How do I debug this? What module is it not able to find? It looks like it already has lerna installed which it should.

npm run test command runs just fine on the local system.

@joebowbeer
Copy link

Can you include relevant parts of the buildspec?

What version of lerna?

It has worked for me...

@s1mrankaur
Copy link
Author

@joebowbeer I am using the CI-CD pipeline from here: https://github.com/aws-samples/aws-codebuild-samples/

In deploy.sh file, I added
npm run deploy

and got

Error: Cannot find module '.'
Require stack:
- /codebuild/output/src309915592/src/node_modules/.bin/lerna
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Module.require (internal/modules/cjs/loader.js:903:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/codebuild/output/src309915592/src/node_modules/.bin/lerna:11:3)
    at Module._compile (internal/modules/cjs/loader.js:1015:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/codebuild/output/src309915592/src/node_modules/.bin/lerna' ]
}

lerna version is 4.0.0

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

2 participants