Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit ccfefe2

Browse files
authored
Merge pull request #245 from aws-samples/devops-buildspec-npm-fix
Fix bug with npm postinstall via buildspec.yml by changing to 'npm install --prefix' instead
2 parents 7c01125 + ddb91ce commit ccfefe2

File tree

6 files changed

+252
-7
lines changed

6 files changed

+252
-7
lines changed

DevOps/2_ContinuousDeliveryPipeline/uni-api/buildspec.yml

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ phases:
66
nodejs: 10
77

88
commands:
9+
# Install application dependencies
10+
- npm install --prefix app
11+
12+
# Install dependencies needed for running tests
913
- npm install
1014

1115
# Upgrade AWS CLI to the latest version

DevOps/2_ContinuousDeliveryPipeline/uni-api/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
"author": "",
66
"license": "ISC",
77
"dependencies": {},
8-
"scripts": {
9-
"postinstall": "cd app && npm install"
10-
},
8+
"scripts": {},
119
"devDependencies": {
1210
"mocha": "^4.0.1",
1311
"proxyquire": "^1.8.0"

DevOps/3_XRay/uni-api/app/package-lock.json

+242
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DevOps/3_XRay/uni-api/app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"author": "",
66
"license": "ISC",
77
"dependencies": {
8-
"aws-xray-sdk": "^2.153.0",
8+
"aws-sdk": "^2.153.0",
99
"aws-xray-sdk": "^1.1.6"
1010
}
1111
}

DevOps/3_XRay/uni-api/buildspec.yml

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ phases:
66
nodejs: 10
77

88
commands:
9+
# Install application dependencies
10+
- npm install --prefix app
11+
912
# Install dependencies needed for running tests
1013
- npm install
1114

DevOps/3_XRay/uni-api/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
"author": "",
66
"license": "ISC",
77
"dependencies": {},
8-
"scripts": {
9-
"postinstall": "cd app && npm install"
10-
},
8+
"scripts": {},
119
"devDependencies": {
1210
"mocha": "^4.0.1",
1311
"proxyquire": "^1.8.0"

0 commit comments

Comments
 (0)