ElasticBeanstalk - Container Command Webpack Build Error
I am trying to migrate my webpack build command from having to be run before pushing to a repo and deploying to my server to having an elasticbeanstalk extension run a container command. I thought simply added an eb extension with npm run build
would generate this without any issue like it does in the local environment, but I receive the following error:
Command execution failed: Activity failed. (ElasticBeanstalk::ActivityFatalError)
caused by:
> app@0.5.0 build /tmp/deployment/application
> webpack
npm ERR! Linux 4.14.47-56.37.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.14.3-linux-x64/bin/node" "/bin/npm" "run" "build"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! file sh
npm ERR! path sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn sh
npm ERR! app@0.5.0 build: `webpack`
npm ERR! spawn sh ENOENT
npm ERR!
npm ERR! Failed at the app@0.5.0 build script 'webpack'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls app
npm ERR! There is likely additional logging output above.
npm ERR! Linux 4.14.47-56.37.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.14.3-linux-x64/bin/node" "/bin/npm" "run" "build"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
here is the elastic beanstalk configuration file:
container_commands:
00_npm_build:
command: "sudo npm run build"
the config.json script section:
"main": "app.js",
"scripts":
"start": "node app.js",
"build": "webpack",
"test": "echo "Error: no test specified" && exit 1",
"sql": "./node_modules/sequelize-cli/lib/sequelize",
"sql:migrate": "npm run sql db:migrate"
,
and the webpack config:
module.exports =
entry: "./public/index.js",
output:
path: __dirname + "/dist",
filename: "bundle.js"
,
module:
loaders: [
test: /.js$/,
exclude: /node_modules/,
loader: "babel-loader"
,
test: /.jsx$/,
exclude: /node_modules/,
loader: "babel-loader"
]
,
;
webpack amazon-elastic-beanstalk
add a comment |
I am trying to migrate my webpack build command from having to be run before pushing to a repo and deploying to my server to having an elasticbeanstalk extension run a container command. I thought simply added an eb extension with npm run build
would generate this without any issue like it does in the local environment, but I receive the following error:
Command execution failed: Activity failed. (ElasticBeanstalk::ActivityFatalError)
caused by:
> app@0.5.0 build /tmp/deployment/application
> webpack
npm ERR! Linux 4.14.47-56.37.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.14.3-linux-x64/bin/node" "/bin/npm" "run" "build"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! file sh
npm ERR! path sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn sh
npm ERR! app@0.5.0 build: `webpack`
npm ERR! spawn sh ENOENT
npm ERR!
npm ERR! Failed at the app@0.5.0 build script 'webpack'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls app
npm ERR! There is likely additional logging output above.
npm ERR! Linux 4.14.47-56.37.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.14.3-linux-x64/bin/node" "/bin/npm" "run" "build"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
here is the elastic beanstalk configuration file:
container_commands:
00_npm_build:
command: "sudo npm run build"
the config.json script section:
"main": "app.js",
"scripts":
"start": "node app.js",
"build": "webpack",
"test": "echo "Error: no test specified" && exit 1",
"sql": "./node_modules/sequelize-cli/lib/sequelize",
"sql:migrate": "npm run sql db:migrate"
,
and the webpack config:
module.exports =
entry: "./public/index.js",
output:
path: __dirname + "/dist",
filename: "bundle.js"
,
module:
loaders: [
test: /.js$/,
exclude: /node_modules/,
loader: "babel-loader"
,
test: /.jsx$/,
exclude: /node_modules/,
loader: "babel-loader"
]
,
;
webpack amazon-elastic-beanstalk
add a comment |
I am trying to migrate my webpack build command from having to be run before pushing to a repo and deploying to my server to having an elasticbeanstalk extension run a container command. I thought simply added an eb extension with npm run build
would generate this without any issue like it does in the local environment, but I receive the following error:
Command execution failed: Activity failed. (ElasticBeanstalk::ActivityFatalError)
caused by:
> app@0.5.0 build /tmp/deployment/application
> webpack
npm ERR! Linux 4.14.47-56.37.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.14.3-linux-x64/bin/node" "/bin/npm" "run" "build"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! file sh
npm ERR! path sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn sh
npm ERR! app@0.5.0 build: `webpack`
npm ERR! spawn sh ENOENT
npm ERR!
npm ERR! Failed at the app@0.5.0 build script 'webpack'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls app
npm ERR! There is likely additional logging output above.
npm ERR! Linux 4.14.47-56.37.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.14.3-linux-x64/bin/node" "/bin/npm" "run" "build"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
here is the elastic beanstalk configuration file:
container_commands:
00_npm_build:
command: "sudo npm run build"
the config.json script section:
"main": "app.js",
"scripts":
"start": "node app.js",
"build": "webpack",
"test": "echo "Error: no test specified" && exit 1",
"sql": "./node_modules/sequelize-cli/lib/sequelize",
"sql:migrate": "npm run sql db:migrate"
,
and the webpack config:
module.exports =
entry: "./public/index.js",
output:
path: __dirname + "/dist",
filename: "bundle.js"
,
module:
loaders: [
test: /.js$/,
exclude: /node_modules/,
loader: "babel-loader"
,
test: /.jsx$/,
exclude: /node_modules/,
loader: "babel-loader"
]
,
;
webpack amazon-elastic-beanstalk
I am trying to migrate my webpack build command from having to be run before pushing to a repo and deploying to my server to having an elasticbeanstalk extension run a container command. I thought simply added an eb extension with npm run build
would generate this without any issue like it does in the local environment, but I receive the following error:
Command execution failed: Activity failed. (ElasticBeanstalk::ActivityFatalError)
caused by:
> app@0.5.0 build /tmp/deployment/application
> webpack
npm ERR! Linux 4.14.47-56.37.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.14.3-linux-x64/bin/node" "/bin/npm" "run" "build"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! file sh
npm ERR! path sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn sh
npm ERR! app@0.5.0 build: `webpack`
npm ERR! spawn sh ENOENT
npm ERR!
npm ERR! Failed at the app@0.5.0 build script 'webpack'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls app
npm ERR! There is likely additional logging output above.
npm ERR! Linux 4.14.47-56.37.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.14.3-linux-x64/bin/node" "/bin/npm" "run" "build"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
here is the elastic beanstalk configuration file:
container_commands:
00_npm_build:
command: "sudo npm run build"
the config.json script section:
"main": "app.js",
"scripts":
"start": "node app.js",
"build": "webpack",
"test": "echo "Error: no test specified" && exit 1",
"sql": "./node_modules/sequelize-cli/lib/sequelize",
"sql:migrate": "npm run sql db:migrate"
,
and the webpack config:
module.exports =
entry: "./public/index.js",
output:
path: __dirname + "/dist",
filename: "bundle.js"
,
module:
loaders: [
test: /.js$/,
exclude: /node_modules/,
loader: "babel-loader"
,
test: /.jsx$/,
exclude: /node_modules/,
loader: "babel-loader"
]
,
;
webpack amazon-elastic-beanstalk
webpack amazon-elastic-beanstalk
asked Nov 15 '18 at 2:40
cphillcphill
1,69963880
1,69963880
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53311645%2felasticbeanstalk-container-command-webpack-build-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53311645%2felasticbeanstalk-container-command-webpack-build-error%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown