aws-samples / aws-samples/aws-codebuild-samples
Lerna command in AWS Codebuild
- 主要言語
- JavaScript
- スター
- 242
- フォーク
- 452
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
```
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. (/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.
コントリビューションガイド
調査の方向性
CodeBuild パイプラインのコマンド `lerna run --stream test --parallel` から始め、ローカルで動作する `npm run test` コマンドと比較します。Lerna がどのようにインストールされているか、また CodeBuild でサービスの `serverless-bundle test --verbose --coverage` スクリプトがどのように呼び出されているかを確認します。不足しているモジュールを特定し、パイプラインでテストコマンドが正常に実行されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- aws, javascript, node.js
- 領域
- cloud, devops
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100