pparedes1 / alexa-lgtv-remote

Control your webOS powered LG TV with amazon's alexa.
MIT License
6 stars 1 forks source link

Help on Heroku #8

Closed StarfighterJ closed 6 years ago

StarfighterJ commented 6 years ago

Help what am I doing wrong? C:\Users\TEST\Downloads\alexa-lgtv-remote-master\alexa-lgtv-remote-master>heroku create Creating app... done, ⬢ shielded-cliffs-65521 https://shielded-cliffs-65521.herokuapp.com/ | https://git.heroku.com/shielded-cliffs-65521.git

C:\Users\TEST\Downloads\alexa-lgtv-remote-master\alexa-lgtv-remote-master>git push master fatal: not a git repository (or any of the parent directories): .git

C:\Users\TEST\Downloads\alexa-lgtv-remote-master\alexa-lgtv-remote-master> I am trying to Push the repository from my Computer I am really lost here

pparedes1 commented 6 years ago

so have you initialized that folder as a git repository using something like git init? I use a graphical tool sourcetree to push/manage repos but the command line should work. Once you are confident you have a git repository you can simply type:

heroku git:remote -a <heroku repo name, in this case above shielded-cliffs-65521>

and then you should be able to push your files to the repo... You can check on your heroku dashboard to make sure the app is running, all environment variables are set, etc.

If needing to test pushing repositories, try something like this or this so you are comfortable with what you are doing. I'm not sure why you have a directory inside a directory with the same name so just want to make sure you are comfortable with the basics before doing something else...

StarfighterJ commented 6 years ago

I'll give that shot tomorrow the directory inside a directory was caused by the extract all. When LOL if I get it up there, do I do npm install and npm run start in Heroku cmd prompt? I did not do the git init because I thought it going to change everything, but I will do it Also where would the Endpoint be hiding to put in Alexa Development?

pparedes1 commented 6 years ago

If you've configured the heroku app using the node framework, you shouldn't have to do anything, when you push your repository it should get all the dependencies and run the app. You can check the logs and/or go into the console if something is wrong.

https://[app-name].herokuapp.com/ is where your app resides, so you would put https://[app-name].herokuapp.com/lgtv-remote as the endpoint in Amazon. Maybe I'm paranoid, but I would create a new Heroku app (and mask the above posts), so the internet doesn't start changing your channels 👍 ...

Note, in your environment variables for the app in Heroku (found on the dashboard). you have to put your ip address as the one from your ISP NOT your local network address (e.g. 192.168.x.x) and you'll have to forward any incoming requests from the port you select to the tv itself. Depending on your router the setting will in different places (I'd go here if you need help with that).

pparedes1 commented 6 years ago

Also because the turning on the TV isn't working 100% you should start with the TV on and try something simple like muting or changing apps.

StarfighterJ commented 6 years ago

Got it pushed up there but it is not working in Alexa Development. here is the push results I do see some errors also I used this as my endpoint: https://floating-brook-12420.herokuapp.com/lgtv-remote Dumb question how do I know if it is running up there also when I exit Heroku will it still run up there?

C:\Users\TEST\Downloads\alexa-lgtv-remote-master\alexa-lgtv-remote-master>git push heroku master Counting objects: 38, done. Delta compression using up to 8 threads. Compressing objects: 100% (31/31), done. Writing objects: 100% (38/38), 80.90 KiB | 4.49 MiB/s, done. Total 38 (delta 1), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Node.js app detected remote: remote: -----> Creating runtime environment remote: remote: NPM_CONFIG_LOGLEVEL=error remote: NODE_VERBOSE=false remote: NODE_ENV=production remote: NODE_MODULES_CACHE=true remote: remote: -----> Installing binaries remote: engines.node (package.json): unspecified remote: engines.npm (package.json): unspecified (use default) remote: engines.yarn (package.json): unspecified (use default) remote: remote: Resolving node version 8.x... remote: Downloading and installing node 8.11.1... remote: Using default npm version: 5.6.0 remote: Resolving yarn version 1.x... remote: Downloading and installing yarn (1.6.0)... remote: Installed yarn 1.6.0 remote: remote: -----> Restoring cache remote: Skipping cache restore (not-found) remote: remote: -----> Building dependencies remote: Installing node modules (yarn.lock) remote: yarn install v1.6.0 remote: [1/4] Resolving packages... remote: [2/4] Fetching packages... remote: info fsevents@1.1.3: The platform "linux" is incompatible with this module. remote: info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. remote: [3/4] Linking dependencies... remote: [4/4] Building fresh packages... remote: Done in 24.02s. remote: remote: -----> Caching build remote: Clearing previous node cache remote: Saving 2 cacheDirectories (default): remote: - node_modules remote: - bower_components (nothing to cache) remote: remote: -----> Pruning devDependencies remote: yarn install v1.6.0 remote: [1/4] Resolving packages... remote: [2/4] Fetching packages... remote: info fsevents@1.1.3: The platform "linux" is incompatible with this module. remote: info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. remote: [3/4] Linking dependencies... remote: [4/4] Building fresh packages... remote: warning Ignored scripts due to flag. remote: Done in 3.22s. remote: remote: -----> Build succeeded! remote: -----> Discovering process types remote: Procfile declares types -> (none) remote: Default types for buildpack -> web remote: remote: -----> Compressing... remote: Done: 19.9M remote: -----> Launching... remote: Released v3 remote: https://floating-brook-12420.herokuapp.com/ deployed to Heroku remote: remote: Verifying deploy... done. To https://git.heroku.com/floating-brook-12420.git

pparedes1 commented 6 years ago

OK so the above log suggests that the application was pushed to Heroku and that it was deployed. To check the status of the app you can go to https://dashboard.heroku.com/apps/[app-name]/logs and see whats happening with the app.

I can tell that you have likely not set any environment variables because it states above

remote: -----> Pruning devDependencies

You'll want to create an environment variable in the settings page (https://dashboard.heroku.com/apps/[app-name]/settings called YARN_PRODUCTION, and set that to false, so that it does install the dev dependencies. Also on that page you'll set things that are in you .env file locally (like your MAC address and IP address as described above). Also, you are not masking your app name, so anyone can go to https://floating-brook-12420.herokuapp.com/lgtv-settings and turn your tv off, etc so might be a good idea to mask with [app-name] (as a suggestion when posting to a public website)...

StarfighterJ commented 6 years ago

Another note doing a node.js npm install using the new code on my computer I get this: C:\Users\TEST\Downloads\alexa-lgtv-remote-master\alexa-lgtv-remote-master>npm install npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

up to date in 6.391s [!] 2 vulnerabilities found [8958 packages audited] Severity: 2 low Run npm audit for more detail

Not sure if the warnings on fsevents meaning anything I read it is not important

StarfighterJ commented 6 years ago

Here is the Check Status logs: I had to switch to Chrome cause edge did not support Edge It looks like a major Fail

2018-05-08T20:19:39.635355+00:00 app[web.1]: npm ERR! syscall spawn 2018-05-08T20:19:39.636466+00:00 app[web.1]: npm ERR! alexa-lgtv-remote@1.0.0 start: gulp build && node dist/index.js 2018-05-08T20:19:39.636621+00:00 app[web.1]: npm ERR! spawn ENOENT 2018-05-08T20:19:39.636840+00:00 app[web.1]: npm ERR! 2018-05-08T20:19:39.637003+00:00 app[web.1]: npm ERR! Failed at the alexa-lgtv-remote@1.0.0 start script. 2018-05-08T20:19:39.637156+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2018-05-08T20:19:39.641811+00:00 app[web.1]: 2018-05-08T20:19:39.641963+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2018-05-08T20:19:39.642082+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-05-08T20_19_39_638Z-debug.log 2018-05-08T20:19:39.729106+00:00 heroku[web.1]: State changed from starting to crashed 2018-05-08T20:48:21.077338+00:00 heroku[web.1]: State changed from crashed to starting 2018-05-08T20:48:20.830606+00:00 app[api]: Release v4 created by user jpwillig@cox.net 2018-05-08T20:48:20.830606+00:00 app[api]: Set YARN_PRODUCTION config vars by user jpwillig@cox.net 2018-05-08T20:48:23.316333+00:00 heroku[web.1]: Starting process with command npm start 2018-05-08T20:48:25.326386+00:00 app[web.1]: 2018-05-08T20:48:25.326409+00:00 app[web.1]: > alexa-lgtv-remote@1.0.0 start /app 2018-05-08T20:48:25.326411+00:00 app[web.1]: > gulp build && node dist/index.js 2018-05-08T20:48:25.326412+00:00 app[web.1]: 2018-05-08T20:48:25.331672+00:00 app[web.1]: sh: 1: gulp: not found 2018-05-08T20:48:25.335772+00:00 app[web.1]: npm ERR! file sh 2018-05-08T20:48:25.335970+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2018-05-08T20:48:25.336123+00:00 app[web.1]: npm ERR! errno ENOENT 2018-05-08T20:48:25.336267+00:00 app[web.1]: npm ERR! syscall spawn 2018-05-08T20:48:25.337336+00:00 app[web.1]: npm ERR! alexa-lgtv-remote@1.0.0 start: gulp build && node dist/index.js 2018-05-08T20:48:25.337509+00:00 app[web.1]: npm ERR! spawn ENOENT 2018-05-08T20:48:25.337725+00:00 app[web.1]: npm ERR! 2018-05-08T20:48:25.337895+00:00 app[web.1]: npm ERR! Failed at the alexa-lgtv-remote@1.0.0 start script. 2018-05-08T20:48:25.338054+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2018-05-08T20:48:25.341380+00:00 app[web.1]: 2018-05-08T20:48:25.341565+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2018-05-08T20:48:25.341695+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-05-08T20_48_25_339Z-debug.log 2018-05-08T20:48:25.391347+00:00 heroku[web.1]: Process exited with status 1 2018-05-08T20:48:25.558938+00:00 heroku[web.1]: State changed from starting to crashed 2018-05-08T20:48:25.561694+00:00 heroku[web.1]: State changed from crashed to starting 2018-05-08T20:48:27.727534+00:00 heroku[web.1]: Starting process with command npm start 2018-05-08T20:48:29.794449+00:00 app[web.1]: 2018-05-08T20:48:29.794475+00:00 app[web.1]: > alexa-lgtv-remote@1.0.0 start /app 2018-05-08T20:48:29.794477+00:00 app[web.1]: > gulp build && node dist/index.js 2018-05-08T20:48:29.794478+00:00 app[web.1]: 2018-05-08T20:48:29.809432+00:00 app[web.1]: sh: 1: gulp: not found 2018-05-08T20:48:29.813922+00:00 app[web.1]: npm ERR! file sh 2018-05-08T20:48:29.814114+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2018-05-08T20:48:29.814243+00:00 app[web.1]: npm ERR! errno ENOENT 2018-05-08T20:48:29.814385+00:00 app[web.1]: npm ERR! syscall spawn 2018-05-08T20:48:29.815418+00:00 app[web.1]: npm ERR! alexa-lgtv-remote@1.0.0 start: gulp build && node dist/index.js 2018-05-08T20:48:29.815556+00:00 app[web.1]: npm ERR! spawn ENOENT 2018-05-08T20:48:29.815726+00:00 app[web.1]: npm ERR! 2018-05-08T20:48:29.815855+00:00 app[web.1]: npm ERR! Failed at the alexa-lgtv-remote@1.0.0 start script. 2018-05-08T20:48:29.816063+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2018-05-08T20:48:29.825213+00:00 app[web.1]: 2018-05-08T20:48:29.825464+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2018-05-08T20:48:29.825656+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-05-08T20_48_29_819Z-debug.log 2018-05-08T20:48:29.965355+00:00 heroku[web.1]: State changed from starting to crashed 2018-05-08T20:48:29.893185+00:00 heroku[web.1]: Process exited with status 1 Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect... 2018-05-08T20:48:29.815418+00:00 app[web.1]: npm ERR! alexa-lgtv-remote@1.0.0 start: gulp build && node dist/index.js 2018-05-08T20:48:29.815556+00:00 app[web.1]: npm ERR! spawn ENOENT 2018-05-08T20:48:29.815726+00:00 app[web.1]: npm ERR! 2018-05-08T20:48:29.815855+00:00 app[web.1]: npm ERR! Failed at the alexa-lgtv-remote@1.0.0 start script. 2018-05-08T20:48:29.816063+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2018-05-08T20:48:29.825213+00:00 app[web.1]: 2018-05-08T20:48:29.825464+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2018-05-08T20:48:29.825656+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-05-08T20_48_29_819Z-debug.log 2018-05-08T20:48:29.965355+00:00 heroku[web.1]: State changed from starting to crashed 2018-05-08T20:48:29.893185+00:00 heroku[web.1]: Process exited with status 1 2018-05-08T20:53:45.260399+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/lgtv-settings" host=floating-brook-12420.herokuapp.com request_id=f09519ab-a185-4e25-bdd6-637cd657201b fwd="xxx.xx.xxx.xx" dyno= connect= service= status=503 bytes= protocol=https

StarfighterJ commented 6 years ago

I hope I did this right on YARN_PRODUCTION, and set that to false. 2018-05-08

StarfighterJ commented 6 years ago

What did you mean on the .env file? what do I set? And how do I mask with [app-name]?

pparedes1 commented 6 years ago

remote: -----> Pruning devDependencies
remote: Skipping because YARN_PRODUCTION is 'false'

Make any changes locally so it forces a change to Heroku (or you can use this technique to push the repo again.

Another option is that once you get it working, you delete the actual Heroku apps and create a new one (or rename it)... Again you might not see any issue with that, just providing my paranoia.

StarfighterJ commented 6 years ago

Hum Getting same results as on the this technique site: C:\Users\TEST\Downloads\alexa-lgtv-remote-master\alexa-lgtv-remote-master>git push heroku master Everything up-to-date Do I need to Delete it and start over? Does TV_SOCKET and TV_MAC need Values or leave like this 2018-05-08 2

pparedes1 commented 6 years ago

You could delete it and restart, you could make a commit to your local repository and push those changes, or you could follow the link in my previous post under this technique as it will give you 3 or 4 ways to do the same thing.

You need to set the variables similar to how you set your .env file (with the exception of having your ISP IP address instead of your TV local network address).

StarfighterJ commented 6 years ago

Did a total re-start today ngrok work great Heroku here is the logs: 2018-05-09T18:08:49.884739+00:00 app[web.1]: npm ERR! errno ENOENT 2018-05-09T18:08:49.885013+00:00 app[web.1]: npm ERR! syscall spawn 2018-05-09T18:08:49.886775+00:00 app[web.1]: npm ERR! alexa-lgtv-remote@1.0.0 start: gulp build && node dist/index.js 2018-05-09T18:08:49.886996+00:00 app[web.1]: npm ERR! spawn ENOENT 2018-05-09T18:08:49.887288+00:00 app[web.1]: npm ERR! 2018-05-09T18:08:49.887503+00:00 app[web.1]: npm ERR! Failed at the alexa-lgtv-remote@1.0.0 start script. 2018-05-09T18:08:49.887713+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2018-05-09T18:08:49.919137+00:00 app[web.1]: 2018-05-09T18:08:49.919408+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2018-05-09T18:08:49.919573+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-05-09T18_08_49_889Z-debug.log

These the steps I did to push the app: cd C:\Users\TEST\Downloads\alexa-lgtv-remote-master\alexa-lgtv-remote-master git init git add . git commit -m "LGTV Remote" heroku create It Created pure-taiga-12473 I went to settings and set the config Vars_ heroku git:remote -a pure-taiga-12473 git push heroku master Then in Alexa Development endpoint add this https://pure-taiga-12473.herokuapp.com/lgtv-remote

Here is the Push build: C:\Users\TEST\Downloads\alexa-lgtv-remote-master\alexa-lgtv-remote-master>git push heroku master Counting objects: 38, done. Delta compression using up to 8 threads. Compressing objects: 100% (31/31), done. Writing objects: 100% (38/38), 80.90 KiB | 4.49 MiB/s, done. Total 38 (delta 1), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Node.js app detected remote: remote: -----> Creating runtime environment remote: remote: NPM_CONFIG_LOGLEVEL=error remote: YARN_PRODUCTION==false remote: NODE_VERBOSE=false remote: NODE_ENV=production remote: NODE_MODULES_CACHE=true remote: remote: -----> Installing binaries remote: engines.node (package.json): unspecified remote: engines.npm (package.json): unspecified (use default) remote: engines.yarn (package.json): unspecified (use default) remote: remote: Resolving node version 8.x... remote: Downloading and installing node 8.11.1... remote: Using default npm version: 5.6.0 remote: Resolving yarn version 1.x... remote: Downloading and installing yarn (1.6.0)... remote: Installed yarn 1.6.0 remote: remote: -----> Restoring cache remote: Skipping cache restore (not-found) remote: remote: -----> Building dependencies remote: Installing node modules (yarn.lock) remote: yarn install v1.6.0 remote: [1/4] Resolving packages... remote: [2/4] Fetching packages... remote: info fsevents@1.1.3: The platform "linux" is incompatible with this module. remote: info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. remote: [3/4] Linking dependencies... remote: [4/4] Building fresh packages... remote: Done in 15.23s. remote: remote: -----> Caching build remote: Clearing previous node cache remote: Saving 2 cacheDirectories (default): remote: - node_modules remote: - bower_components (nothing to cache) remote: remote: -----> Pruning devDependencies remote: Skipping because YARN_PRODUCTION is '=false' remote: remote: -----> Build succeeded! remote: -----> Discovering process types remote: Procfile declares types -> (none) remote: Default types for buildpack -> web remote: remote: -----> Compressing... remote: Done: 19.9M remote: -----> Launching... remote: Released v6 remote: https://pure-taiga-12473.herokuapp.com/ deployed to Heroku remote: remote: Verifying deploy... done. To https://git.heroku.com/pure-taiga-12473.git

StarfighterJ commented 6 years ago

By Accident I did a npm install using ngrok look what is did: C:\Users\TEST\Downloads\alexa-lgtv-remote-master_1\alexa-lgtv-remote-master>npm install npm WARN deprecated github@0.2.4: 'github' has been renamed to '@octokit/rest' (https://git.io/vNB11)

websocket@1.0.26 install C:\Users\TEST\Downloads\alexa-lgtv-remote-master_1\alexa-lgtv-remote-master\node_modules\websocket (node-gyp rebuild 2> builderror.log) || (exit 0)

C:\Users\TEST\Downloads\alexa-lgtv-remote-master_1\alexa-lgtv-remote-master\node_modules\websocket>if not defined npm_config_node_gyp (node "C:\Users\TEST\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\TEST\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )

nodemon@1.17.4 postinstall C:\Users\TEST\Downloads\alexa-lgtv-remote-master_1\alexa-lgtv-remote-master\node_modules\nodemon node bin/postinstall || exit 0

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 744 packages from 467 contributors in 34.37s [!] 2 vulnerabilities found [8958 packages audited] Severity: 2 low Run npm audit for more detail

I went this site it said take a look https://github.com/octokit/rest.js/releases/tag/v14.0.0 Not sure if this is BS or what? FYI Heroku did the Same as above

pparedes1 commented 6 years ago

The only other thing that might jumps out at me is the node engine isn't being explicitly stated in this app, you could try to add the below to your packages.json file and report back with the push to heroku, but not clear. Add to the appropriate place in the JSON file with or without the comma at the end.

"engines": {
    "node": "8.11.1"
    },
StarfighterJ commented 6 years ago

I am lost on the console for your app (type bash thing can you give some steps on that.

pparedes1 commented 6 years ago

In Heroku (https://dashboard.heroku.com/apps), click on your app. On the upper right hand side of screen where it says More, click Run console. At the prompt you should type bash and you will get a prompt into the console. I'm not sure how else to orient you, that is a bash prompt, where you can test the app, list the files that were pushed to the repository, etc...

StarfighterJ commented 6 years ago

Sorry about that kinda new at Heroku stuff, but this is what I got on bash: ~ $ bash ~ $ npm run start > alexa-lgtv-remote@1.0.0 start /app > gulp build && node dist/index.js sh: 1: gulp: not found npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! alexa-lgtv-remote@1.0.0 start: gulp build && node dist/index.js npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the alexa-lgtv-remote@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /app/.npm/_logs/2018-05-10T18_20_54_293Z-debug.log ~ $ I am going to do this all over again and see what happens

StarfighterJ commented 6 years ago

A re-do after push dump I see some errors: C:\alexa-lgtv-remote-master>git push heroku master Counting objects: 38, done. Delta compression using up to 8 threads. Compressing objects: 100% (31/31), done. Writing objects: 100% (38/38), 80.90 KiB | 3.85 MiB/s, done. Total 38 (delta 1), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Node.js app detected remote: remote: -----> Creating runtime environment remote: remote: NPM_CONFIG_LOGLEVEL=error remote: YARN_PRODUCTION==false remote: NODE_VERBOSE=false remote: NODE_ENV=production remote: NODE_MODULES_CACHE=true remote: remote: -----> Installing binaries remote: engines.node (package.json): unspecified remote: engines.npm (package.json): unspecified (use default) remote: engines.yarn (package.json): unspecified (use default) remote: remote: Resolving node version 8.x... remote: Downloading and installing node 8.11.1... remote: Using default npm version: 5.6.0 remote: Resolving yarn version 1.x... remote: Downloading and installing yarn (1.6.0)... remote: Installed yarn 1.6.0 remote: remote: -----> Restoring cache remote: Skipping cache restore (not-found) remote: remote: -----> Building dependencies remote: Installing node modules (yarn.lock) remote: yarn install v1.6.0 remote: [1/4] Resolving packages... remote: [2/4] Fetching packages... remote: info fsevents@1.1.3: The platform "linux" is incompatible with this module. remote: info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. remote: [3/4] Linking dependencies... remote: [4/4] Building fresh packages... remote: Done in 15.35s. remote: remote: -----> Caching build remote: Clearing previous node cache remote: Saving 2 cacheDirectories (default): remote: - node_modules remote: - bower_components (nothing to cache) remote: remote: -----> Pruning devDependencies remote: Skipping because YARN_PRODUCTION is '=false' remote: remote: -----> Build succeeded! remote: -----> Discovering process types remote: Procfile declares types -> (none) remote: Default types for buildpack -> web remote: remote: -----> Compressing... remote: Done: 19.9M remote: -----> Launching... remote: Released v6 remote: https://sheltered-dawn-90424.herokuapp.com/ deployed to Heroku remote: remote: Verifying deploy... done. To https://git.heroku.com/sheltered-dawn-90424.git

Now the log: 2018-05-11T19:04:03.976954+00:00 app[web.1]: npm ERR! syscall spawn 2018-05-11T19:04:03.979228+00:00 app[web.1]: npm ERR! alexa-lgtv-remote@1.0.0 start: gulp build && node dist/index.js 2018-05-11T19:04:03.979689+00:00 app[web.1]: npm ERR! spawn ENOENT 2018-05-11T19:04:03.981141+00:00 app[web.1]: npm ERR! 2018-05-11T19:04:03.981606+00:00 app[web.1]: npm ERR! Failed at the alexa-lgtv-remote@1.0.0 start script. 2018-05-11T19:04:03.983341+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2018-05-11T19:04:03.994291+00:00 app[web.1]: 2018-05-11T19:04:03.995695+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2018-05-11T19:04:03.995866+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-05-11T19_04_03_985Z-debug.log 2018-05-11T19:04:04.987749+00:00 heroku[web.1]: State changed from starting to crashed

Now the Bash: 2018-05-11T19:04:03.976954+00:00 app[web.1]: npm ERR! syscall spawn 2018-05-11T19:04:03.979228+00:00 app[web.1]: npm ERR! alexa-lgtv-remote@1.0.0 start: gulp build && node dist/index.js 2018-05-11T19:04:03.979689+00:00 app[web.1]: npm ERR! spawn ENOENT 2018-05-11T19:04:03.981141+00:00 app[web.1]: npm ERR! 2018-05-11T19:04:03.981606+00:00 app[web.1]: npm ERR! Failed at the alexa-lgtv-remote@1.0.0 start script. 2018-05-11T19:04:03.983341+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2018-05-11T19:04:03.994291+00:00 app[web.1]: 2018-05-11T19:04:03.995695+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2018-05-11T19:04:03.995866+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-05-11T19_04_03_985Z-debug.log 2018-05-11T19:04:04.987749+00:00 heroku[web.1]: State changed from starting to crashed

StarfighterJ commented 6 years ago

These are the current version I am using: C:\alexa-lgtv-remote-master>npm --version 6.0.1

C:\alexa-lgtv-remote-master>node --version v9.11.1

C:\alexa-lgtv-remote-master>npm --version 6.0.1

C:\alexa-lgtv-remote-master>git --version git version 2.17.0.windows.1

C:\alexa-lgtv-remote-master>

pparedes1 commented 6 years ago

The app is not starting correctly on Heroku for some reason. It's not finding gulp on the remote platform as your bash console data shows. Can you publish the contents of your package.json file in Heroku? You can go to bash and type cat package.json. also can you paste the contents of ls -l in the directory of the bash shell?

Did you attempt to modify the contents of package.json and add the 'engines piece above?

StarfighterJ commented 6 years ago

I am pulling my hair out of my head npm just did a update, but this is what I got after npm install: npm -version 6.0.1 ~ $ npm install npm WARN deprecated github@0.2.4: 'github' has been renamed to '@octokit/rest' (https://git.io/vNB11) up to date in 24.264s [!] 2 vulnerabilities found [8958 packages audited] Severity: 2 Low Run npm audit for more detail

pparedes1 commented 6 years ago

that message in of itself should not be an issue. the problem is the instance is looking for gulp and other dependencies and im not sure why, if you post you package.json that might lead to some answers as well as a listing of the files in your heroku app, we might be able to see what is happening...

StarfighterJ commented 6 years ago

Here is the cat package.json: cat package.json { "name": "alexa-lgtv-remote", "version": "1.0.0", "description": "Control your webOS powered LG TV with amazon's alexa.", "main": "index.js", "scripts": { "start": "gulp build && node dist/index.js", "test": "gulp lint", "dev": "flow-typed install && npm run start", "watch": "gulp serve", "docs": "gulp build && node dist/bin/docgen.js" }, "repository": { "type": "git", "url": "https://github.com/voydz/alexa-lgtv-remote.git" }, "keywords": [ "alexa", "lg", "tv", "lgtv", "webOS" ], "author": "voydz", "license": "MIT", "dependencies": { "alexa-app": "^4.2.2", "dotenv": "^5.0.1", "express": "^4.14.1", "i18next": "^11.2.3", "i18next-sync-fs-backend": "^1.1.0", "lgtv2": "^1.2.0", "promise": "^8.0.1", "wake_on_lan": "^0.0.4" }, "devDependencies": { "babel-core": "^6.26.0", "babel-eslint": "^8.2.3", "babel-preset-env": "^1.6.1", "babel-preset-flow": "^6.23.0", "eslint": "^4.15.0", "eslint-config-google": "^0.9.1", "eslint-plugin-flowtype": "^2.46.3", "flow-bin": "^0.63.1", "flow-typed": "^2.0.0", "gulp": "^4.0.0", "gulp-babel": "^7.0.0", "gulp-eslint": "^4.0.1", "merge-stream": "^1.0.1", "nodemon": "^1.17.3" } }

StarfighterJ commented 6 years ago

not sure what you mean by contents ls-1 and no I did not modify the contents of the package.json I have no clue how to do that or where to put it.. Sorry the way the above is Pasting the bash stuff I don't no why it looks like that in here.

StarfighterJ commented 6 years ago

While you Figure out what I am doing wrong in Heroku What Service DID you play with in ASW I have only used Lambda for Alexa control on Drirectv and Icomfort: 2018-05-11

pparedes1 commented 6 years ago

Lambda would be the service that could deploy the node.js app on Amazon, but I'm not the expert on figuring out how to get it to compile correctly by zipping up the correct node_modules, potentially one of the amazon forums could help you with that.

I'm trying to understand what is going on in your app deployment, I asked for you to run ls -l so that I could see your directory in Heroku, similar to dir in windows. The only other idea I have is to run npm install from the bash prompt and then try to run gulp to see if it's installed it correctly. Sorry am not more help there.

StarfighterJ commented 6 years ago

here is ls -1 at the After Bash run Console:

~ $ ls -1 LICENSE README.md applist.json bin favicon.ico gulpfile.js index.js node_modules package.json speechAssets src yarn.lock ~ $

StarfighterJ commented 6 years ago

Here is npm install and gulp ~ $ npm install > websocket@1.0.26 install /app/node_modules/websocket > (node-gyp rebuild 2> builderror.log) || (exit 0) make: Entering directory '/app/node_modules/websocket/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o bufferutil.target.mk:96: recipe for target 'Release/obj.target/bufferutil/src/bufferutil.o' failed make: Leaving directory '/app/node_modules/websocket/build' added 6 packages, removed 2 packages and updated 79 packages in 8.746s ~ $ gulp bash: gulp: command not found ~ $

StarfighterJ commented 6 years ago

Curious What did you mean by node framework? is the a command for that? I just only used the Heroku Command Line Interface (CLI) then it updated to the GIT cmd program.

If you've configured the heroku app using the node framework, you shouldn't have to do anything, when you push your repository it should get all the dependencies and run the app. You can check the logs and/or go into the console if something is wrong.

abhishekjain14 commented 6 years ago

I'm running into the same issue. Any help or debugging steps would be appreciated.

The output for npm install is:

`npm install

websocket@1.0.26 install /app/node_modules/websocket (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/app/node_modules/websocket/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o bufferutil.target.mk:96: recipe for target 'Release/obj.target/bufferutil/src/bufferutil.o' failed make: Leaving directory '/app/node_modules/websocket/build' added 6 packages, removed 2 packages and updated 79 packages in 4.075s`

After which, running gulp says "command not found"

pparedes1 commented 6 years ago

@abhishekjain14 are you trying to deploy in Heroku or locally? can you share more details on your configuration?

@StarfighterJ I created a new branch of the code called Heroku, where you can test your deployments to heroku. Using this code, I created a new Heroku app using the dashboard and linked to that branch of code and it runs automatically without issues. You can fork that repository if you'd like but remember you'll need to set the following variables in your Config Vars setting for your app to actually work: PORT, TV_SOCKET, TV_MAC, CALLHOME.

The reason why your application is not compiling/working in Heroku (as evidence of not finding gulp) in the original code is because it's not finding the developer dependencies. In order to do that out of the box you MUST set YARN_PRODUCTION=false in the config of the app on the Heroku dashboard BEFORE pushing the code to Heroku, that will tell Heroku to install both.

The new branch I created makes all of the dependencies required but you should be able to configure this to your liking. https://stackoverflow.com/questions/18875674/whats-the-difference-between-dependencies-devdependencies-and-peerdependencies might be a good primer on understanding devdependencies on node a little better.

pparedes1 commented 6 years ago

@abhishekjain14 I'll close this item for now, feel free to open up another ticket if you have specific issues, I wasn't clear if this was on Heroku or otherwise... Good luck.