error source file android_asset www build vendor js ionic app content is not loading - ionic2

I run ionic cordova platform add android#6.4.0 and when i run my app with android studio:
I can log in well, but when the homespage comes, the data does not load, and in other pages as well. On every page i do a request, the data does not load, and at the exact same moment i tap on those pages, i see something like this(but with different number) in the console of android studio:
“ERROR”, source: file:///android_asset/www/build/vendor.js (any line)
More of what's inside android studio's logcat
08-12 10:44:10.611 8547-8547/io.ionic.starter I/chromium: [INFO:CONSOLE(1882)] "TOKEN EN GETORDER - CARRITOSERVICE.TS", source: file:///android_asset/www/build/main.js (1882)
08-12 10:44:10.611 8547-8547/io.ionic.starter D/SystemWebChromeClient: file:///android_asset/www/build/main.js: Line 1883 : eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjdiYmU1YzA0ZDVmMTlkMWM0NDBkZTVkNGU0NWVjMDk2MjkzN2NjZDI1ODZiZmQxN2UxMjViOWUxYmM0YzZmZTA1MWE1N2RiNTM4NDRlMGIxIn0.eyJhdWQiOiIyIiwianRpIjoiN2JiZTVjMDRkNWYxOWQxYzQ0MGRlNWQ0ZTQ1ZWMwOTYyOTM3Y2NkMjU4NmJmZDE3ZTEyNWI5ZTFiYzRjNmZlMDUxYTU3ZGI1Mzg0NGUwYjEiLCJpYXQiOjE1MzQwODEwOTEsIm5iZiI6MTUzNDA4MTA5MSwiZXhwIjoxNTM1Mzc3MDkxLCJzdWIiOiI1MDciLCJzY29wZXMiOltdfQ.egUykxz7sykM4DzOsdZLQax_-AZtoqlgyYVoPvYNgn8wz4DcH_2TZcVPY-tH-6D0FgqciPHsmPptaUqWQjEjtrcfTPKcN05qsz5DTavlDVOcLqW4CSvwld8QDf8FX_aVM4JAz7uarqkF11Zxl6pB_e0F6ayUdlslhlTMpmyBOXWB45_VH-MVlUFpkG2BLB1FzrzwrEKplcgOKKgArw8Fh_D8Y3Y-wnL8LmoVySJX0GBnULWQiGlSA808a8U2O1zP2onITRtSAPA90jd_JSKmjhrxxq4Gz0gePbQdlYp_wmQGzT9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L8LmoVySJX0GBnULWQiGlSA808a8U2O1zP2onITRtSAPA90jd_JSKmjhrxxq4Gz0gePbQdlYp_wmQGzT9L1f_6VwenaDtvQ49d9V-MH2ZOYl3l1loU7UOr44PMRQ-_Ne1SZXujp4zvTJvJ_wBaCC1nCB_DwNnRNjqUodxjCojoZJgCRgPgoGhmoOZBLnoYxwrr-vGDl0BsJo9lhVLCzxO2ifJtMlp_2KrRdlqKQ4EJjgZq2l3bwIqjzx7sHVBkhLIJovAoxR3grwjtCL5vq1Ng3rEXt_j-LLMhuIxnLNM2CDJYfpv1_n8WFbL6m8J2JbzNZon_9wdsQbmebPTGh40MJkaJ7TCxp9jU2BuEiJORvlY6ud090jcZFmFJil3uqcTcOj5deUZjoyor8m72aTgMwzv2VRWf25CjSNHpaUlsqeLtnQzC_zyL8ilUA-KKEQDmzeOyh8_agOM", source: file:///android_asset/www/build/main.js (1883)
08-12 10:44:10.804 8547-8547/io.ionic.starter D/SystemWebChromeClient: file:///android_asset/www/build/vendor.js: Line 1823 : ERROR
08-12 10:44:10.805 8547-8547/io.ionic.starter I/chromium: [INFO:CONSOLE(1823)] "ERROR", source: file:///android_asset/www/build/vendor.js (1823)
08-12 10:44:42.247 8547-8547/io.ionic.starter D/SystemWebChromeClient: file:///android_asset/www/build/main.js: Line 942 : ionViewWillEnter
08-12 10:44:42.247 8547-8547/io.ionic.starter I/chromium: [INFO:CONSOLE(942)] "ionViewWillEnter", source: file:///android_asset/www/build/main.js (942)
08-12 10:44:42.249 8547-8547/io.ionic.starter D/SystemWebChromeClient: file:///android_asset/www/build/main.js: Line 1858 : TOKEN EN GETCART - CARRITOSERVICE.TS
08-12 10:44:42.249 8547-8547/io.ionic.starter I/chromium: [INFO:CONSOLE(1858)] "TOKEN EN GETCART - CARRITOSERVICE.TS", source: file:///android_asset/www/build/main.js (1858)
08-12 10:44:42.250 8547-8547/io.ionic.starter D/SystemWebChromeClient: file:///android_asset/www/build/main.js: Line 1859 : eyJ0eXAiOiJKV1Q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ZFmFJil3uqcTcOj5deUZjoyor8m72aTgMwzv2VRWf25CjSNHpaUlsqeLtnQzC_zyL8ilUA-KKEQDmzeOyh8_agOM", source: file:///android_asset/www/build/main.js (1859)
08-12 10:44:42.263 8547-8547/io.ionic.starter D/SystemWebChromeClient: file:///android_asset/www/build/main.js: Line 1484 : ionViewDidLeave PedidosPage
08-12 10:44:42.263 8547-8547/io.ionic.starter I/chromium: [INFO:CONSOLE(1484)] "ionViewDidLeave PedidosPage", source: file:///android_asset/www/build/main.js (1484)
08-12 10:44:42.432 8547-8547/io.ionic.starter D/SystemWebChromeClient: file:///android_asset/www/build/vendor.js: Line 1823 : ERROR
08-12 10:44:42.432 8547-8547/io.ionic.starter I/chromium: [INFO:CONSOLE(1823)] "ERROR", source: file:///android_asset/www/build/vendor.js (1823)
08-12 10:44:42.590 8547-8547/io.ionic.starter D/SystemWebChromeClient: file:///android_asset/www/build/vendor.js: Line 1823 : ERROR
08-12 10:44:42.590 8547-8547/io.ionic.starter I/chromium: [INFO:CONSOLE(1823)] "ERROR", source: file:///android_asset/www/build/vendor.js (1823)
08-12 10:44:43.905 8547-8547/io.ionic.starter D/CordovaActivity: Paused the activity.
08-12 10:44:43.971 8547-8547/io.ionic.starter D/CordovaActivity: Stopped the activity.
This is the ionic info:
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.9
Cordova Platforms : android 7.0.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v8.9.4
npm : 5.6.0
OS : Windows 10
Environment Variables:
ANDROID_HOME : C:\Users\JulioD07\Desktop\sdk
Misc:
backend : pro

Related

Could not launch AWS SAM application when using VS Code Debugger "Function not implemented"

I have a generic SAM application generated by AWS Toolkit.
My end goal is to debug my go application line by line.
Sorry if this question gets too long, but I have tried my best to add as few relevant details as possible, while trying to make sure I don't miss anything important.
I am using the default launch.json configurations generated by the Toolkit:
{
"configurations": [
{
"type": "aws-sam",
"request": "direct-invoke",
"name": "sunflowers:HelloWorldFunction (go1.x)",
"invokeTarget": {
"target": "template",
"templatePath": "${workspaceFolder}/template.yaml",
"logicalId": "HelloWorldFunction"
},
"lambda": {
"payload": {},
"environmentVariables": {},
"runtime": "go1.x"
}
},
{
"type": "aws-sam",
"request": "direct-invoke",
"name": "API sunflowers:HelloWorldFunction (go1.x)",
"invokeTarget": {
"target": "api",
"templatePath": "${workspaceFolder}/template.yaml",
"logicalId": "HelloWorldFunction"
},
"api": {
"path": "/hello",
"httpMethod": "get",
"payload": {
"json": {}
}
},
"lambda": {
"runtime": "go1.x"
}
}
]
}
But when I run sunflowers:HelloWorldFunction (go1.x), I get the following error in the AWS Toolkit output:
could not launch process: fork/exec /var/task/hello-world: function not implemented
Full error Log:
2022-08-04 18:41:12 [INFO]: Preparing to debug locally: Lambda "hello-world"
2022-08-04 18:41:12 [INFO]: Building SAM application...
2022-08-04 18:41:12 [INFO]: Command: (not started) [/opt/homebrew/bin/sam build --build-dir /tmp/aws-toolkit-vscode/vsctky6JmVn/output --template /Users/varungawande/playground/goLambdaDebug/sunflowers/template.yaml]
2022-08-04 18:41:13 [INFO]: Your template contains a resource with logical ID "ServerlessRestApi", which is a reserved logical ID in AWS SAM. It could result in unexpected behaviors and is not recommended.
2022-08-04 18:41:13 [INFO]: Building codeuri: /Users/varungawande/playground/goLambdaDebug/sunflowers/hello-world runtime: go1.x metadata: {} architecture: x86_64 functions: HelloWorldFunction
2022-08-04 18:41:13 [INFO]: Running GoModulesBuilder:Build
2022-08-04 18:41:13 [INFO]:
Build Succeeded
2022-08-04 18:41:13 [INFO]:
Built Artifacts : ../../../../../private/tmp/aws-toolkit-vscode/vsctky6JmVn/output
Built Template : ../../../../../private/tmp/aws-toolkit-vscode/vsctky6JmVn/output/template.yaml
Commands you can use next
=========================
[*] Validate SAM template: sam validate
[*] Invoke Function: sam local invoke -t ../../../../../private/tmp/aws-toolkit-vscode/vsctky6JmVn/output/template.yaml
[*] Test Function in the Cloud: sam sync --stack-name {stack-name} --watch
[*] Deploy: sam deploy --guided --template-file ../../../../../private/tmp/aws-toolkit-vscode/vsctky6JmVn/output/template.yaml
2022-08-04 18:41:14 [INFO]: Build complete.
2022-08-04 18:41:14 [INFO]: Starting SAM application locally
2022-08-04 18:41:14 [INFO]: AWS.running.command
Invoking hello-world (go1.x)
Skip pulling image and use local one: public.ecr.aws/sam/emulation-go1.x:rapid-1.53.0-x86_64.
Mounting /tmp/aws-toolkit-vscode/vsctky6JmVn/output/HelloWorldFunction as /var/task:ro,delegated inside runtime container
START RequestId: 8cc3eb7a-20f2-4599-81bc-2f29f8d02102 Version: $LATEST
API server listening at: [::]:5858
2022-08-04T13:11:16Z warning layer=rpc Listening for remote connections (connections are not authenticated nor encrypted)
2022-08-04T13:11:16Z info layer=debugger launching process with args: [/var/task/hello-world]
2022-08-04 18:41:16 [INFO]: Waiting for SAM application to start...
could not launch process: fork/exec /var/task/hello-world: function not implemented
2022/08/04 13:11:16 exit status 1
04 Aug 2022 13:11:16,067 [ERROR] (rapid) Init failed error=Runtime exited with error: exit status 1 InvokeID=
API server listening at: [::]:5858
2022-08-04T13:11:16Z warning layer=rpc Listening for remote connections (connections are not authenticated nor encrypted)
2022-08-04T13:11:16Z info layer=debugger launching process with args: [/var/task/hello-world]
could not launch process: fork/exec /var/task/hello-world: function not implemented
2022/08/04 13:11:16 exit status 1
END RequestId: 0dcb2785-a232-41aa-8f78-f61c82add96b
REPORT RequestId: 0dcb2785-a232-41aa-8f78-f61c82add96b Init Duration: 1.26 ms Duration: 838.60 ms Billed Duration: 839 ms Memory Size: 128 MB Max Memory Used: 128 MB
2022-08-04 18:41:17 [INFO]: Attaching debugger to SAM application...
Command stopped: "sam local invoke"
2022-08-04 18:41:23 [ERROR]: Retry limit reached while trying to attach the debugger.
2022-08-04 18:41:23 [ERROR]: Unable to attach Debugger. Check AWS Toolkit logs. If it took longer than expected to start, you can still attach.
sam local start-api and sam local invoke still work.
The path they mounted at /tmp/aws-toolkit-vscode/vsctky6JmVn/output/HelloWorldFunction does have the file they're looking for.
❯ tree /tmp/aws-toolkit-vscode/vsctky6JmVn/output/HelloWorldFunction
/tmp/aws-toolkit-vscode/vsctky6JmVn/output/HelloWorldFunction
└── hello-world
The hello-world program does have a main function:
package main
import (
"errors"
"fmt"
"io/ioutil"
"net/http"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
var (
// DefaultHTTPGetAddress Default Address
DefaultHTTPGetAddress = "https://checkip.amazonaws.com"
// ErrNoIP No IP found in response
ErrNoIP = errors.New("No IP in HTTP response")
// ErrNon200Response non 200 status code in response
ErrNon200Response = errors.New("Non 200 Response found")
)
func handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
str := "Hello World"
str = exclaim(str)
for i := 3; i < 30; i++ {
str = exclaim(str)
fmt.Println(str, "at", i)
}
resp, err := http.Get(DefaultHTTPGetAddress)
if err != nil {
return events.APIGatewayProxyResponse{}, err
}
if resp.StatusCode != 200 {
return events.APIGatewayProxyResponse{}, ErrNon200Response
}
ip, err := ioutil.ReadAll(resp.Body)
if err != nil {
return events.APIGatewayProxyResponse{}, err
}
if len(ip) == 0 {
return events.APIGatewayProxyResponse{}, ErrNoIP
}
return events.APIGatewayProxyResponse{
Body: fmt.Sprintf("Hello, %v", string(ip)),
StatusCode: 200,
}, nil
}
func main() {
lambda.Start(handler)
}
func exclaim(str string) string {
return str + "!"
}
Note: I'm on a Mac, using the M1 chip(Arch: arm64) but the build-file is being executed for x86-64.
hello-world: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=O4tsTAbXATrthCbExZYS/IcUitw8QuK2KVYZ9ln5Y/QZl7mLeZv6TDrrYMwafh/81ITMlD5ZHrz3gae1BfY, with debug_info, not stripped```
Since it can find the file, Does this mean that the executor can't find the main?

Failed to install Delve for the lambda container on Mac

I used the VS Code AWS Toolkit and SAM to create a basic SAM web app based on Go(I VS Code generate it).
It's some generic template code for the Lambda that reads IP from request and returns a Hello <IP> on the browser.
My end goal is to manage to see line by line debugging on my lambda function in VS Code.
There seem to be some default configurations in my launch.json:
{
"configurations": [
{
"type": "aws-sam",
"request": "direct-invoke",
"name": "sunflowers:HelloWorldFunction (go1.x)",
"invokeTarget": {
"target": "template",
"templatePath": "${workspaceFolder}/sunflowers/template.yaml",
"logicalId": "HelloWorldFunction"
},
"lambda": {
"payload": {},
"environmentVariables": {},
"runtime": "go1.x"
}
},
{
"type": "aws-sam",
"request": "direct-invoke",
"name": "API sunflowers:HelloWorldFunction (go1.x)",
"invokeTarget": {
"target": "api",
"templatePath": "${workspaceFolder}/sunflowers/template.yaml",
"logicalId": "HelloWorldFunction"
},
"api": {
"path": "/hello",
"httpMethod": "GET",
"payload": {
"json": {}
}
},
"lambda": {
"runtime": "go1.x"
}
}
]
}
However on clicking the "Start Debugging" button, I get that error that it can't install delve:
2022-08-03 21:20:46 [ERROR]: log level: info
2022-08-03 21:20:47 [INFO]: Retrieving AWS endpoint data
2022-08-03 21:20:47 [INFO]: OS: Darwin arm64 21.6.0
2022-08-03 21:20:47 [INFO]: Visual Studio Code extension host: 1.69.2
2022-08-03 21:20:47 [INFO]: AWS Toolkit: 1.46.0
2022-08-03 21:20:47 [INFO]: node: 16.13.2
2022-08-03 21:20:47 [INFO]: electron: 18.3.5
2022-08-03 21:21:49 [WARN]: SAM debug: missing AWS credentials (Toolkit is not connected)
2022-08-03 21:21:50 [INFO]: autoconnect: connected: 'profile:default'
2022-08-03 21:21:50 [INFO]: Command: (not started) [/Users/varungawande/Library/Application Support/Code/User/globalStorage/amazonwebservices.aws-toolkit-vscode/debuggers/delve/install-1.9.0.sh ]
2022-08-03 21:21:50 [ERROR]: Failed to cross-compile Delve debugger: Error: spawn Unknown system error -8
at ChildProcess.spawn (node:internal/child_process:412:11)
at Object.spawn (node:child_process:718:9)
at Function.l [as spawn] (/Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:27:9212)
at /Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:1734:1495
at new Promise (<anonymous>)
at cc.run (/Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:1734:1099)
at AH (/Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:2076:252)
at _H (/Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:2075:195)
at E6.invokeConfig (/Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:2082:5965)
at E6.makeAndInvokeConfig (/Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:2082:1314)
at E6.resolveDebugConfigurationWithSubstitutedVariables (/Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:2082:1202) {
errno: -8,
code: 'Unknown system error -8',
syscall: 'spawn'
}
2022-08-03 21:22:27 [INFO]: Command: (not started) [/Users/varungawande/Library/Application Support/Code/User/globalStorage/amazonwebservices.aws-toolkit-vscode/debuggers/delve/install-1.9.0.sh ]
2022-08-03 21:22:27 [ERROR]: Failed to cross-compile Delve debugger: Error: spawn Unknown system error -8
at ChildProcess.spawn (node:internal/child_process:412:11)
at Object.spawn (node:child_process:718:9)
at Function.l [as spawn] (/Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:27:9212)
at /Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:1734:1495
at new Promise (<anonymous>)
at cc.run (/Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:1734:1099)
at AH (/Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:2076:252)
at _H (/Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:2075:195)
at E6.invokeConfig (/Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:2082:5965)
at E6.makeAndInvokeConfig (/Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:2082:1314)
at E6.resolveDebugConfigurationWithSubstitutedVariables (/Users/varungawande/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-1.46.0/dist/src/main.js:2082:1202) {
errno: -8,
code: 'Unknown system error -8',
syscall: 'spawn'
}
2022-08-03 21:25:49 [INFO]: telemetry: sent batch (size=5)
My lambda requires the architecture amd64, while my Mac has the M1 chip, so it has an architecture of arm64. Is the above error due to this architecture mismatch?
I tried running the lambda locally using docker and that worked(using sam local start-api and sam local invoke), but am not sure the above with work as smoothly when using a debugger.
Turns out this is due to a bug in AWS Toolkit extension of VS Code. It was fixed in AWS Toolkit 1.47.

Dockerrun.aws.json: No such file or directory

many developers.
This is my first question and I can't solve this.
I'm using AWS For to deploy out webapp and projects.
and now I just want to deploy so tiny project.
(like just basic django project)
I already test this in local(with "python manage.py runserver").
and build & run dockerfile.
But Deploying is failed with AWS continually.
I write Dockerfile and I use it.
But AWS says to me
"cat: /var/app/current/Dockerrun.aws.json: No such file or directory"
and I don't understand what it says.
This is my code in DockerFile
FROM {{mydockerId}}/myproject:base
COPY . /srv/FestivalMusicList
# static directory setting
RUN cp -f /srv/FestivalMusicList/.config/nginx.conf /etc/nginx/nginx.conf &&\
cp -f /srv/FestivalMusicList/.config/nginx-app.conf /etc/nginx/sites-available/ &&\
rm -f /etc/nginx/site-enabled/* &&\
ln -sf /etc/nginx/sites-available/nginx-app.conf /etc/nginx/sites-enabled/
RUN cp /srv/FestivalMusicList/.config/supervisord.conf /etc/supervisor/conf.d/
RUN mkdir /var/log/celery
EXPOSE 80
This is error
[2019-04-05T15:05:33.308Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_0_festival_music_list/Command 04_setdata_genre] : Starting activity...
[2019-04-05T15:05:33.310Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_0_festival_music_list/Command 04_setdata_genre] : Completed activity.
[2019-04-05T15:05:33.310Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_0_festival_music_list] : Completed activity.
[2019-04-05T15:05:33.310Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Completed activity.
[2019-04-05T15:05:33.328Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0/EbExtensionPostBuild] : Completed activity.
[2019-04-05T15:05:33.328Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0/InfraCleanEbExtension] : Starting activity...
[2019-04-05T15:05:33.329Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0/InfraCleanEbExtension] : Completed activity. Result:
Cleaned ebextensions subdirectories from /tmp.
[2019-04-05T15:05:33.329Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0] : Completed activity. Result:
Application deployment - Command CMD-Startup stage 0 completed
[2019-04-05T15:05:33.329Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage1] : Starting activity...
[2019-04-05T15:05:33.329Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage1/AppDeployEnactHook] : Starting activity...
[2019-04-05T15:05:33.331Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage1/AppDeployEnactHook/00run.sh] : Starting activity...
[2019-04-05T15:05:39.636Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage1/AppDeployEnactHook/00run.sh] : Activity execution failed, because: cat: /var/app/current/Dockerrun.aws.json: No such file or directory
cat: /var/app/current/Dockerrun.aws.json: No such file or directory
01a93e5ed8e11b0c76133e5e446764a8ec95ddd1db144be5d3fceca9fd6c0813
Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Fri Apr 5 15:05:39 UTC 2019:. Check snapshot logs for details. (ElasticBeanstalk::ExternalInvocationError)
caused by: cat: /var/app/current/Dockerrun.aws.json: No such file or directory
cat: /var/app/current/Dockerrun.aws.json: No such file or directory
01a93e5ed8e11b0c76133e5e446764a8ec95ddd1db144be5d3fceca9fd6c0813
Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Fri Apr 5 15:05:39 UTC 2019:. Check snapshot logs for details. (Executor::NonZeroExitStatus
Are you using Elastic Beanstalk? If so, you need the Dockerrun.aws.json at your root directory.
An example of its contents:
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "janedoe/image",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "1234"
}
],
"Volumes": [
{
"HostDirectory": "/var/app/mydb",
"ContainerDirectory": "/etc/mysql"
}
],
"Logging": "/var/log/nginx",
"Entrypoint": "/app/bin/myapp",
"Command": "--argument"
}
For more information: Official Doc's

Can't run node.js example project on AWS

I was trying run this example on the aws website for node.js http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/samples/nodejs-express-hiking-v1.zip
from here
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/nodejs-getstarted.html
(I tired the tutorial that had the same error)
502 Bad Gateway
nginx/1.10.1
Is what is shown.
I also tried changing the port to 5000 but that did not help either.
Here are the logs:
I think the second one is the problem but I have no idea what to do about it.
/var/log/nodejs/nodejs.log
Server running at http://127.0.0.1:8081/
/var/log/nginx/error.log
2017/02/20 04:10:25 [warn] 2488#0: duplicate MIME type "text/html" in /etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf:42
/var/log/eb-activity.log
Did not find to find status of init job. Assuming stopped.
Did not find to find status of init job. Assuming stopped.
[2017-02-20T04:10:21.090Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/20clean.sh] : Starting activity...
[2017-02-20T04:10:21.285Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/20clean.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k app_base_dir
+ EB_APP_BASE_DIR=/var/app
+ rm -rf /var/app
[2017-02-20T04:10:21.286Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/30app_deploy.sh] : Starting activity...
[2017-02-20T04:10:22.003Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/30app_deploy.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k app_base_dir
+ EB_APP_BASE_DIR=/var/app
++ /opt/elasticbeanstalk/bin/get-config container -k app_staging_dir
+ EB_APP_STAGING_DIR=/tmp/deployment/application
++ /opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir
+ EB_APP_DEPLOY_DIR=/var/app/current
++ /opt/elasticbeanstalk/bin/get-config container -k app_user
+ EB_APP_USER=nodejs
+ mkdir /var/app
+ mv /tmp/deployment/application /var/app/current
+ chown -R nodejs:nodejs /var/app/current
[2017-02-20T04:10:22.003Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/40config_deploy.sh] : Starting activity...
[2017-02-20T04:10:22.230Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/40config_deploy.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k config_staging_dir
+ EB_CONFIG_STAGING_DIR=/tmp/deployment/config
++ ls /tmp/deployment/config
+ for i in '$(ls $EB_CONFIG_STAGING_DIR)'
++ sed -e 's/#/\//g'
++ echo '#etc#init#nginx.conf'
+ FILE_NAME=/etc/init/nginx.conf
+ /bin/cp /tmp/deployment/config/#etc#init#nginx.conf /etc/init/nginx.conf
+ for i in '$(ls $EB_CONFIG_STAGING_DIR)'
++ sed -e 's/#/\//g'
++ echo '#etc#init#nodejs.conf'
+ FILE_NAME=/etc/init/nodejs.conf
+ /bin/cp /tmp/deployment/config/#etc#init#nodejs.conf /etc/init/nodejs.conf
+ for i in '$(ls $EB_CONFIG_STAGING_DIR)'
++ sed -e 's/#/\//g'
++ echo '#etc#nginx#conf.d#00_elastic_beanstalk_proxy.conf'
+ FILE_NAME=/etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf
+ /bin/cp /tmp/deployment/config/#etc#nginx#conf.d#00_elastic_beanstalk_proxy.conf /etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf
+ for i in '$(ls $EB_CONFIG_STAGING_DIR)'
++ sed -e 's/#/\//g'
++ echo '#etc#nginx#nginx.conf'
+ FILE_NAME=/etc/nginx/nginx.conf
+ /bin/cp /tmp/deployment/config/#etc#nginx#nginx.conf /etc/nginx/nginx.conf
[2017-02-20T04:10:22.230Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/50start.sh] : Starting activity...
[2017-02-20T04:10:25.232Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/50start.sh] : Completed activity. Result:
+ /opt/elasticbeanstalk/containerfiles/ebnode.py --action start-all
nodejs start/running, process 2473
nginx start/running, process 2488
[2017-02-20T04:10:25.232Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/60monitor_pids.sh] : Starting activity...
[2017-02-20T04:10:25.794Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/60monitor_pids.sh] : Completed activity. Result:
+ '[' -d /etc/healthd ']'
++ /opt/elasticbeanstalk/bin/get-config optionsettings --namespace aws:elasticbeanstalk:container:nodejs --option-name ProxyServer
+ PROXY_SERVER=nginx
+ case "$PROXY_SERVER" in
+ /opt/elasticbeanstalk/bin/healthd-track-pidfile --proxy nginx
+ /opt/elasticbeanstalk/bin/healthd-track-pidfile --name application --location /var/run/nodejs.pid
[2017-02-20T04:10:25.794Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/70restart_healthd.sh] : Starting activity...
[2017-02-20T04:10:25.988Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/70restart_healthd.sh] : Completed activity. Result:
+ '[' -d /etc/healthd ']'
++ /opt/elasticbeanstalk/bin/get-config optionsettings --namespace aws:elasticbeanstalk:container:nodejs --option-name ProxyServer
+ PROXY_SERVER=nginx
+ '[' -f /var/elasticbeanstalk/healthd/current_proxy_server ']'
+ CURRENT_PROXY_SERVER=nginx
+ '[' nginx '!=' nginx ']'
+ echo nginx
[2017-02-20T04:10:25.988Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/enact.
[2017-02-20T04:10:25.988Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployPostHook] : Starting activity...
[2017-02-20T04:10:25.988Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployPostHook] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/post.
[2017-02-20T04:10:25.989Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/PostInitHook] : Starting activity...
[2017-02-20T04:10:25.989Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/PostInitHook] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/postinit.
[2017-02-20T04:10:25.989Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1] : Completed activity. Result:
Application deployment - Command CMD-Startup stage 1 completed
[2017-02-20T04:10:25.989Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter] : Starting activity...
[2017-02-20T04:10:25.990Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigLogRotation] : Starting activity...
[2017-02-20T04:10:25.990Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigLogRotation/10-config.sh] : Starting activity...
[2017-02-20T04:10:26.163Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigLogRotation/10-config.sh] : Completed activity. Result:
Disabled forced hourly log rotation.
[2017-02-20T04:10:26.164Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigLogRotation] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logpublish/hooks/config.
[2017-02-20T04:10:26.164Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigCWLAgent] : Starting activity...
[2017-02-20T04:10:26.164Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigCWLAgent/10-config.sh] : Starting activity...
[2017-02-20T04:10:26.426Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigCWLAgent/10-config.sh] : Completed activity. Result:
Log streaming option setting is not specified, ignore cloudwatch logs setup.
Disabled log streaming.
[2017-02-20T04:10:26.427Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigCWLAgent] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logstreaming/hooks/config.
[2017-02-20T04:10:26.427Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter] : Completed activity.
[2017-02-20T04:10:26.427Z] INFO [2036] - [Application deployment Sample Application#1] : Completed activity. Result:
Application deployment - Command CMD-Startup succeeded
[2017-02-20T04:32:43.707Z] INFO [3166] - [CMD-TailLogs] : Starting activity...
[2017-02-20T04:32:43.708Z] INFO [3166] - [CMD-TailLogs/AddonsBefore] : Starting activity...
[2017-02-20T04:32:43.708Z] INFO [3166] - [CMD-TailLogs/AddonsBefore] : Completed activity.
[2017-02-20T04:32:43.708Z] INFO [3166] - [CMD-TailLogs/TailLogs] : Starting activity...
[2017-02-20T04:32:43.708Z] INFO [3166] - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity...
-------------------------------------
/var/log/nginx/access.log
-------------------------------------
-------------------------------------
/var/log/eb-commandprocessor.log
-------------------------------------
[2017-02-20T04:09:21.232Z] INFO [1745] : Found enabled addons: ["logpublish", "logstreaming"].
[2017-02-20T04:09:21.234Z] INFO [1745] : Updating Command definition of addon logpublish.
[2017-02-20T04:09:21.234Z] INFO [1745] : Updating Command definition of addon logstreaming.
[2017-02-20T04:09:21.234Z] DEBUG [1745] : Retrieving metadata for key: AWS::CloudFormation::Init||Infra-WriteApplication2||files..
[2017-02-20T04:09:21.237Z] DEBUG [1745] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||ManifestFileS3Key..
[2017-02-20T04:09:21.531Z] INFO [1745] : Finding latest manifest from bucket 'elasticbeanstalk-us-west-2-648812771825' with prefix 'resources/environments/e-evnmznnmnr/_runtime/versions/manifest_'.
[2017-02-20T04:09:21.827Z] INFO [1745] : Found manifest with key 'resources/environments/e-evnmznnmnr/_runtime/versions/manifest_1487563665867'.
[2017-02-20T04:09:21.839Z] INFO [1745] : Updated manifest cache: deployment ID 1 and serial 1.
[2017-02-20T04:09:21.840Z] DEBUG [1745] : Loaded definition of Command CMD-PreInit.
[2017-02-20T04:09:21.840Z] INFO [1745] : Executing Initialization
[2017-02-20T04:09:21.841Z] INFO [1745] : Executing command: CMD-PreInit...
[2017-02-20T04:09:21.841Z] INFO [1745] : Executing command CMD-PreInit activities...
[2017-02-20T04:09:21.841Z] DEBUG [1745] : Setting environment variables..
[2017-02-20T04:09:21.841Z] INFO [1745] : Running AddonsBefore for command CMD-PreInit...
[2017-02-20T04:09:21.841Z] DEBUG [1745] : Running stages of Command CMD-PreInit from stage 0 to stage 0...
[2017-02-20T04:09:21.841Z] INFO [1745] : Running stage 0 of command CMD-PreInit...
[2017-02-20T04:09:21.841Z] DEBUG [1745] : Loaded 3 actions for stage 0.
[2017-02-20T04:09:21.841Z] INFO [1745] : Running 1 of 3 actions: InfraWriteConfig...
[2017-02-20T04:09:21.846Z] INFO [1745] : Running 2 of 3 actions: DownloadSourceBundle...
[2017-02-20T04:09:22.518Z] INFO [1745] : Running 3 of 3 actions: PreInitHook...
[2017-02-20T04:09:28.779Z] INFO [1745] : Running AddonsAfter for command CMD-PreInit...
[2017-02-20T04:09:39.489Z] INFO [1745] : Command CMD-PreInit succeeded!
[2017-02-20T04:09:39.490Z] INFO [1745] : Command processor returning results:
{"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"","returncode":0,"events":[]}]}
[2017-02-20T04:09:57.958Z] DEBUG [2036] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-02-20T04:09:57.959Z] DEBUG [2036] : Checking if the command processor should execute...
[2017-02-20T04:09:57.961Z] DEBUG [2036] : Checking whether the command is applicable to instance (i-06a18c392aa73327c)..
[2017-02-20T04:09:57.961Z] INFO [2036] : Command is applicable to this instance (i-06a18c392aa73327c)..
[2017-02-20T04:09:57.962Z] DEBUG [2036] : Checking if the received command stage is valid..
[2017-02-20T04:09:57.962Z] INFO [2036] : No stage_num in command. Valid stage..
[2017-02-20T04:09:57.962Z] INFO [2036] : Received command CMD-Startup: {"execution_data":"{\"leader_election\":\"true\"}","instance_ids":["i-06a18c392aa73327c"],"command_name":"CMD-Startup","api_version":"1.0","resource_name":"AWSEBAutoScalingGroup","request_id":"1e9fb2c8-f722-11e6-a999-2d00f4179ab5","command_timeout":"600"}
[2017-02-20T04:09:57.962Z] INFO [2036] : Command processor should execute command.
[2017-02-20T04:09:57.962Z] DEBUG [2036] : Storing current stage..
[2017-02-20T04:09:57.962Z] DEBUG [2036] : Stage_num does not exist. Not saving null stage. Returning..
[2017-02-20T04:09:57.962Z] DEBUG [2036] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-02-20T04:09:57.962Z] DEBUG [2036] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2017-02-20T04:09:57.963Z] DEBUG [2036] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2017-02-20T04:09:57.964Z] INFO [2036] : Found enabled addons: ["logpublish", "logstreaming"].
[2017-02-20T04:09:57.966Z] INFO [2036] : Updating Command definition of addon logpublish.
[2017-02-20T04:09:57.966Z] INFO [2036] : Updating Command definition of addon logstreaming.
[2017-02-20T04:09:57.967Z] DEBUG [2036] : Refreshing metadata...
[2017-02-20T04:09:58.389Z] DEBUG [2036] : Refreshed environment metadata.
[2017-02-20T04:09:58.389Z] DEBUG [2036] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2017-02-20T04:09:58.390Z] DEBUG [2036] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2017-02-20T04:09:58.392Z] INFO [2036] : Found enabled addons: ["logpublish", "logstreaming"].
[2017-02-20T04:09:58.394Z] INFO [2036] : Updating Command definition of addon logpublish.
[2017-02-20T04:09:58.394Z] INFO [2036] : Updating Command definition of addon logstreaming.
[2017-02-20T04:09:58.394Z] DEBUG [2036] : Loaded definition of Command CMD-Startup.
[2017-02-20T04:09:58.395Z] INFO [2036] : Executing Application deployment
[2017-02-20T04:09:58.397Z] INFO [2036] : Executing command: CMD-Startup...
[2017-02-20T04:09:58.397Z] INFO [2036] : Executing command CMD-Startup activities...
[2017-02-20T04:09:58.397Z] DEBUG [2036] : Setting environment variables..
[2017-02-20T04:09:58.397Z] INFO [2036] : Running AddonsBefore for command CMD-Startup...
[2017-02-20T04:09:58.397Z] DEBUG [2036] : Running stages of Command CMD-Startup from stage 0 to stage 1...
[2017-02-20T04:09:58.397Z] INFO [2036] : Running stage 0 of command CMD-Startup...
[2017-02-20T04:09:58.397Z] INFO [2036] : Running leader election...
[2017-02-20T04:09:58.818Z] INFO [2036] : Instance is Leader.
[2017-02-20T04:09:58.818Z] DEBUG [2036] : Loaded 7 actions for stage 0.
[2017-02-20T04:09:58.818Z] INFO [2036] : Running 1 of 7 actions: HealthdLogRotation...
[2017-02-20T04:09:58.830Z] INFO [2036] : Running 2 of 7 actions: HealthdHTTPDLogging...
[2017-02-20T04:09:58.831Z] INFO [2036] : Running 3 of 7 actions: HealthdNginxLogging...
[2017-02-20T04:09:58.832Z] INFO [2036] : Running 4 of 7 actions: EbExtensionPreBuild...
[2017-02-20T04:09:59.345Z] INFO [2036] : Running 5 of 7 actions: AppDeployPreHook...
[2017-02-20T04:10:15.101Z] INFO [2036] : Running 6 of 7 actions: EbExtensionPostBuild...
[2017-02-20T04:10:15.598Z] INFO [2036] : Running 7 of 7 actions: InfraCleanEbExtension...
[2017-02-20T04:10:15.602Z] INFO [2036] : Running stage 1 of command CMD-Startup...
[2017-02-20T04:10:15.602Z] DEBUG [2036] : Loaded 3 actions for stage 1.
[2017-02-20T04:10:15.602Z] INFO [2036] : Running 1 of 3 actions: AppDeployEnactHook...
[2017-02-20T04:10:25.988Z] INFO [2036] : Running 2 of 3 actions: AppDeployPostHook...
[2017-02-20T04:10:25.989Z] INFO [2036] : Running 3 of 3 actions: PostInitHook...
[2017-02-20T04:10:25.989Z] INFO [2036] : Running AddonsAfter for command CMD-Startup...
[2017-02-20T04:10:26.427Z] INFO [2036] : Command CMD-Startup succeeded!
[2017-02-20T04:10:26.428Z] INFO [2036] : Command processor returning results:
{"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"","returncode":0,"events":[]}]}
[2017-02-20T04:32:43.697Z] DEBUG [3166] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-02-20T04:32:43.698Z] DEBUG [3166] : Checking if the command processor should execute...
[2017-02-20T04:32:43.701Z] DEBUG [3166] : Checking whether the command is applicable to instance (i-06a18c392aa73327c)..
[2017-02-20T04:32:43.701Z] INFO [3166] : Command is applicable to this instance (i-06a18c392aa73327c)..
[2017-02-20T04:32:43.701Z] DEBUG [3166] : Checking if the received command stage is valid..
[2017-02-20T04:32:43.702Z] INFO [3166] : No stage_num in command. Valid stage..
[2017-02-20T04:32:43.702Z] INFO [3166] : Received command CMD-TailLogs: {"execution_data":"{\"aws_access_key_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W52aXJvbm1lbnRzXC9sb2dzXC8iXSxbInN0YXJ0cy13aXRoIiwiJHgtYW16LW1ldGEtYmF0Y2hfaWQiLCIiXSxbInN0YXJ0cy13aXRoIiwiJHgtYW16LW1ldGEtZmlsZV9uYW1lIiwiIl0sWyJzdGFydHMtd2l0aCIsIiR4LWFtei1zZWN1cml0eS10b2tlbiIsIiJdLFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0sWyJlcSIsIiRidWNrZXQiLCJlbGFzdGljYmVhbnN0YWxrLXVzLXdlc3QtMi02NDg4MTI3NzE4MjUiXSxbImVxIiwiJGFjbCIsInByaXZhdGUiXV19\"}","instance_ids":["i-06a18c392aa73327c"],"data":"9e0cfab0-f725-11e6-8f0e-9f392d16cbe4","command_name":"CMD-TailLogs","api_version":"1.0","resource_name":"AWSEBAutoScalingGroup","request_id":"9e0cfab0-f725-11e6-8f0e-9f392d16cbe4","command_timeout":"600"}
[2017-02-20T04:32:43.702Z] INFO [3166] : Command processor should execute command.
[2017-02-20T04:32:43.702Z] DEBUG [3166] : Storing current stage..
[2017-02-20T04:32:43.702Z] DEBUG [3166] : Stage_num does not exist. Not saving null stage. Returning..
[2017-02-20T04:32:43.702Z] DEBUG [3166] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-02-20T04:32:43.702Z] DEBUG [3166] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2017-02-20T04:32:43.703Z] DEBUG [3166] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2017-02-20T04:32:43.704Z] INFO [3166] : Found enabled addons: ["logpublish", "logstreaming"].
[2017-02-20T04:32:43.706Z] INFO [3166] : Updating Command definition of addon logpublish.
[2017-02-20T04:32:43.706Z] INFO [3166] : Updating Command definition of addon logstreaming.
[2017-02-20T04:32:43.707Z] DEBUG [3166] : Loaded definition of Command CMD-TailLogs.
[2017-02-20T04:32:43.707Z] INFO [3166] : Executing CMD-TailLogs
[2017-02-20T04:32:43.707Z] INFO [3166] : Executing command: CMD-TailLogs...
[2017-02-20T04:32:43.708Z] INFO [3166] : Executing command CMD-TailLogs activities...
[2017-02-20T04:32:43.708Z] DEBUG [3166] : Setting environment variables..
[2017-02-20T04:32:43.708Z] INFO [3166] : Running AddonsBefore for command CMD-TailLogs...
[2017-02-20T04:32:43.708Z] DEBUG [3166] : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
[2017-02-20T04:32:43.708Z] INFO [3166] : Running stage 0 of command CMD-TailLogs...
[2017-02-20T04:32:43.708Z] DEBUG [3166] : Loaded 1 actions for stage 0.
[2017-02-20T04:32:43.708Z] INFO [3166] : Running 1 of 1 actions: TailLogs...

'npm build' does not generate project build on Windows 10 Pro

OS: Windows 10 Pro
NPM Version: 3.8.6
So, I'm attempting to build a project with npm build but no project build output folder is generated, and the following error logs are generated:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm- cli.js',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm#3.8.6
3 info using node#v6.1.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle learn-redux#1.0.0~prebuild: learn-redux#1.0.0
6 silly lifecycle learn-redux#1.0.0~prebuild: no script for prebuild, continuing
7 info lifecycle learn-redux#1.0.0~build: learn-redux#1.0.0
8 verbose lifecycle learn-redux#1.0.0~build: unsafe-perm in lifecycle true
9 verbose lifecycle learn-redux#1.0.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\d0475\Documents\Projects\learn-redux\node_modules\.bin;C:\Program Files\nodejs;C:\Users\d0475\Documents\Cmder\bin;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\share\vim\vim74;C:\Users\d0475\Documents\Cmder\vendor\conemu-maximus5\ConEmu\Scripts;C:\Users\d0475\Documents\Cmder\vendor\conemu-maximus5;C:\Users\d0475\Documents\Cmder\vendor\conemu-maximus5\ConEmu;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files\Calibre2\;C:\Users\d0475\AppData\Local\Microsoft\WindowsApps;C:\Users\d0475\AppData\Roaming\npm;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\d0475\AppData\Local\Microsoft\WindowsApps;;C:\Users\d0475\Documents\Cmder
10 verbose lifecycle learn-redux#1.0.0~build: CWD: C:\Users\d0475\Documents\Projects\learn-redux
11 silly lifecycle learn-redux#1.0.0~build: Args: [ '/d /s /c', 'npm run clean && npm run build:webpack' ]
12 silly lifecycle learn-redux#1.0.0~build: Returned: code: 1 signal: null
13 info lifecycle learn-redux#1.0.0~build: Failed to exec build script
14 verbose stack Error: learn-redux#1.0.0 build: `npm run clean && npm run build:webpack`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:239:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:850:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid learn-redux#1.0.0
16 verbose cwd C:\Users\d0475\Documents\Projects\learn-redux
17 error Windows_NT 10.0.14986
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
19 error node v6.1.0
20 error npm v3.8.6
21 error code ELIFECYCLE
22 error learn-redux#1.0.0 build: `npm run clean && npm run build:webpack`
22 error Exit status 1
23 error Failed at the learn-redux#1.0.0 build script 'npm run clean && npm run build:webpack'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the learn-redux package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error npm run clean && npm run build:webpack
23 error You can get information on how to open an issue for this project with:
23 error npm bugs learn-redux
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls learn-redux
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
My package.json reads as follows:
"scripts": {
"build:webpack": "NODE_ENV=production webpack --config webpack.config.prod.js",
"build": "npm run clean && npm run build:webpack",
"test": "NODE_ENV=production mocha './tests/**/*.spec.js' --compilers js:babel-core/register",
"clean": "rimraf dist",
"start": "node devServer.js"
},
and my webpack.config.prod.js reads as follows:
var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'source-map',
entry: [
'./client/reduxstagram'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': "'production'"
}
}),
new webpack.optimize.UglifyJsPlugin({
compressor: {
warnings: false
}
})
],
module: {
loaders: [
// js
{
test: /\.js$/,
loaders: ['babel'],
include: path.join(__dirname, 'client')
},
// CSS
{
test: /\.styl$/,
include: path.join(__dirname, 'client'),
loader: 'style-loader!css-loader!stylus-loader'
}
]
}
};
What is the issue here?
The issue was resolved by changing:
"build:webpack": "NODE_ENV=production webpack --config webpack.config.prod.js",
to
"build:webpack": "set NODE_ENV=production && webpack --config webpack.config.prod.js",
I had the same problem and sometimes it is not so much the code.
Sometimes where you put the "main.js" and "app.js" files they go in the "src" folder of your project!
The file "main.js" is copied in the folder "src" and in that same folder is the sub-folder "components" "app.js"
That was the solution to my problem!