Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

Cannot run on aws ubuntu ec2 instance #23

Open
logeshhy opened this issue Jun 20, 2017 · 7 comments
Open

Cannot run on aws ubuntu ec2 instance #23

logeshhy opened this issue Jun 20, 2017 · 7 comments

Comments

@logeshhy
Copy link

I followed all your steps, everything goes fine, until i run npm run dev..

when i run that command, am seeing this error.. i have no idea how to fix this.. kindly help me

npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! googlechrome-biograf@12.1.0 dev: npm run build && parallelshell "npm run watch" "npm run serve"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the googlechrome-biograf@12.1.0 dev script 'npm run build && parallelshell "npm run watch" "npm run serve"'.
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 googlechrome-biograf package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build && parallelshell "npm run watch" "npm run serve"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs googlechrome-biograf
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls googlechrome-biograf
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/sample-media-pwa/npm-debug.log
ubuntu@ip-172-31-25-244:/sample-media-pwa$ clear
ubuntu@ip-172-31-25-244:
/sample-media-pwa$ sudo npm run dev

googlechrome-biograf@12.1.0 dev /home/ubuntu/sample-media-pwa
npm run build && parallelshell "npm run watch" "npm run serve"

googlechrome-biograf@12.1.0 build /home/ubuntu/sample-media-pwa
npm run clean-dist && npm run make-dist && npm run make-client && npm run copy-all && npm run build-js && npm run build-sass && npm run build-resource-list

googlechrome-biograf@12.1.0 clean-dist /home/ubuntu/sample-media-pwa
rm -rf dist

googlechrome-biograf@12.1.0 make-dist /home/ubuntu/sample-media-pwa
mkdirp dist

googlechrome-biograf@12.1.0 make-client /home/ubuntu/sample-media-pwa
mkdirp dist/client

googlechrome-biograf@12.1.0 copy-all /home/ubuntu/sample-media-pwa
npm run copy-server && npm run copy-config && npm run copy-views && npm run copy-client

googlechrome-biograf@12.1.0 copy-server /home/ubuntu/sample-media-pwa
cp -R src/server dist

googlechrome-biograf@12.1.0 copy-config /home/ubuntu/sample-media-pwa
cp -R src/config dist

googlechrome-biograf@12.1.0 copy-views /home/ubuntu/sample-media-pwa
cp -R src/views dist

googlechrome-biograf@12.1.0 copy-client /home/ubuntu/sample-media-pwa
copy "src/client//." "!src/client/scripts//." "!src/client/styles//." "!src/client/videos//." dist/client

✔ ../../dist/client/images/header/ic_account_circle_white_24px.svg
✔ ../../dist/client/images/header/ic_close_white_24px.svg
✔ ../../dist/client/images/header/ic_menu_white_24px.svg
✔ ../../dist/client/images/home/home-promo.png
✔ ../../dist/client/images/icon@128.png
✔ ../../dist/client/images/icon@256.png
✔ ../../dist/client/images/icon@512.png
✔ ../../dist/client/images/icon@64.png
✔ ../../dist/client/images/spinner.png
✔ ../../dist/client/images/video-placeholder.png
✔ ../../dist/client/images/video/ic_cast_connected_white_24px.svg
✔ ../../dist/client/images/video/ic_cast_white_24px.svg
✔ ../../dist/client/images/video/ic_close_white_24px.svg
✔ ../../dist/client/images/video/ic_file_download_white_24px.svg
✔ ../../dist/client/images/video/ic_forward_30_white_24px.svg
✔ ../../dist/client/images/video/ic_fullscreen_exit_white_24px.svg
✔ ../../dist/client/images/video/ic_fullscreen_white_24px.svg
✔ ../../dist/client/images/video/ic_lock_white_24px.svg
✔ ../../dist/client/images/video/ic_offline_pin_white_24px.svg
✔ ../../dist/client/images/video/ic_pause_white_24px.svg
✔ ../../dist/client/images/video/ic_play_arrow_white_24px.svg
✔ ../../dist/client/images/video/ic_replay_30_white_24px.svg
✔ ../../dist/client/images/video/ic_replay_white_24px.svg
✔ ../../dist/client/images/video/ic_timelapse_white_24px.svg
✔ ../../dist/client/images/video/ic_volume_off_white_24px.svg
✔ ../../dist/client/images/video/ic_volume_up_white_24px.svg
✔ ../../dist/client/images/video/icon-buffering.png
✔ ../../dist/client/images/video/icon-playback.png
✔ ../../dist/client/manifest.json
✔ ../../dist/client/sw.js
✔ ../../dist/client/third_party/libs/idb-keyval.js
✔ ../../dist/client/third_party/libs/shaka-player.compiled.js
✔ ../../dist/client/third_party/Roboto/Roboto-300.woff
✔ ../../dist/client/third_party/Roboto/Roboto-400.woff
✔ ../../dist/client/third_party/Roboto/Roboto-500.woff
✔ ../../dist/client/videos.json

googlechrome-biograf@12.1.0 build-js /home/ubuntu/sample-media-pwa
node build/transpile-javascript.js

/home/ubuntu/sample-media-pwa/build/transpile-javascript.js:49
let cache;
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3

npm ERR! Linux 4.4.0-1020-aws
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build-js"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! googlechrome-biograf@12.1.0 build-js: node build/transpile-javascript.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the googlechrome-biograf@12.1.0 build-js script 'node build/transpile-javascript.js'.
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 googlechrome-biograf package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build/transpile-javascript.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs googlechrome-biograf
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls googlechrome-biograf
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/sample-media-pwa/npm-debug.log

npm ERR! Linux 4.4.0-1020-aws
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! googlechrome-biograf@12.1.0 build: npm run clean-dist && npm run make-dist && npm run make-client && npm run copy-all && npm run build-js && npm run build-sass && npm run build-resource-list
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the googlechrome-biograf@12.1.0 build script 'npm run clean-dist && npm run make-dist && npm run make-client && npm run copy-all && npm run build-js && npm run build-sass && npm run build-resource-list'.
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 googlechrome-biograf package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run clean-dist && npm run make-dist && npm run make-client && npm run copy-all && npm run build-js && npm run build-sass && npm run build-resource-list
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs googlechrome-biograf
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls googlechrome-biograf
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/sample-media-pwa/npm-debug.log

npm ERR! Linux 4.4.0-1020-aws
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "dev"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! googlechrome-biograf@12.1.0 dev: npm run build && parallelshell "npm run watch" "npm run serve"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the googlechrome-biograf@12.1.0 dev script 'npm run build && parallelshell "npm run watch" "npm run serve"'.
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 googlechrome-biograf package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build && parallelshell "npm run watch" "npm run serve"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs googlechrome-biograf
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls googlechrome-biograf
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/sample-media-pwa/npm-debug.log
ubuntu@ip-172-31-25-244:~/sample-media-pwa$

@joeyparrish
Copy link

We (Shaka Player) have instructions in our docs on how to upgrade node and npm. I recommend you try this:

# Install an upgrade utility for node
sudo npm install -g n
# Upgrade node
sudo n stable
# Upgrade npm
sudo npm install -g npm

@logeshhy
Copy link
Author

thank you, i did upgrade node and npm.. after upgrading to latest version which is 8 *.. which i enter which node and node -v.. it still points to node version 4.

@joeyparrish
Copy link

What do you get in the output of these commands?

which node
node -v
which nodejs
nodejs -v
which npm
npm --version
ls -l /usr/bin/node*
ls -l /usr/local/bin/node*
ls -l /etc/alternatives/node*
ls -l /usr/lib/node_modules/
ls -l /usr/local/lib/node_modules/

@logeshhy
Copy link
Author

user@DESKTOP-0DEBRRJ:/mnt/c/Users/Logesh/Desktop/NodeJSWorks$ which node /usr/local/bin/node user@DESKTOP-0DEBRRJ:/mnt/c/Users/Logesh/Desktop/NodeJSWorks$ node -v v8.1.2 user@DESKTOP-0DEBRRJ:/mnt/c/Users/Logesh/Desktop/NodeJSWorks$ which nodejs /usr/bin/nodejs user@DESKTOP-0DEBRRJ:/mnt/c/Users/Logesh/Desktop/NodeJSWorks$ which npm /usr/local/bin/npm user@DESKTOP-0DEBRRJ:/mnt/c/Users/Logesh/Desktop/NodeJSWorks$ npm --version 5.0.3 user@DESKTOP-0DEBRRJ:/mnt/c/Users/Logesh/Desktop/NodeJSWorks$ ls -l /usr/bin/node* lrwxrwxrwx 1 root root 33 Dec 8 2015 /usr/bin/node-gyp -> ../share/node-gyp/bin/node-gyp.js -rwxr-xr-x 1 root root 11187096 May 21 2016 /usr/bin/nodejs user@DESKTOP-0DEBRRJ:/mnt/c/Users/Logesh/Desktop/NodeJSWorks$ ls -l /usr/local/bin/node* -rwxr-xr-x 1 root root 36186806 Jun 20 19:16 /usr/local/bin/node user@DESKTOP-0DEBRRJ:/mnt/c/Users/Logesh/Desktop/NodeJSWorks$ ls -l /etc/alternatives/node* ls: cannot access '/etc/alternatives/node*': No such file or directory user@DESKTOP-0DEBRRJ:/mnt/c/Users/Logesh/Desktop/NodeJSWorks$ ls -l /etc/alternatives/node* ls: cannot access '/etc/alternatives/node*': No such file or directory user@DESKTOP-0DEBRRJ:/mnt/c/Users/Logesh/Desktop/NodeJSWorks$ ls -l /usr/lib/node_modules/ ls: cannot access '/usr/lib/node_modules/': No such file or directory user@DESKTOP-0DEBRRJ:/mnt/c/Users/Logesh/Desktop/NodeJSWorks$ ls -l /usr/local/lib/node_modules/ total 16 drwxr-xr-x 0 user user 4096 Jun 22 10:32 bower drwxr-xr-x 0 user user 4096 Jun 21 16:21 grunt-cli drwxr-xr-x 0 nobody user 4096 Jun 20 19:09 n drwxr-xr-x 0 root root 4096 Jun 20 19:17 npm

@logeshhy
Copy link
Author

user@DESKTOP-0DEBRRJ:/mnt/c/Users/Logesh/Desktop/NodeJSWorks/shaka-player$ sudo python build/all.py [sudo] password for user: [INFO] Generating Closure dependencies... INFO] Running Closure linter... 187 files checked, no errors found. npm ERR! code 1 npm ERR! Command failed: /usr/bin/git clone -q git://github.com/yaniswang/HTMLHint.git /home/user/.npm/_cacache/tmp/git-clone-feefb2b3 npm ERR! /home/user/.npm/_cacache/tmp/git-clone-feefb2b3/.git: Permission denied npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! /home/user/.npm/_logs/2017-06-23T05_59_33_728Z-debug.log Traceback (most recent call last): File "build/all.py", line 44, in <module> shakaBuildHelpers.run_main(main) File "/mnt/c/Users/Logesh/Desktop/NodeJSWorks/shaka-player/build/shakaBuildHelpers.py", line 292, in run_main sys.exit(main(sys.argv[1:])) File "build/all.py", line 30, in main code = check.main([]) File "/mnt/c/Users/Logesh/Desktop/NodeJSWorks/shaka-player/build/check.py", line 156, in main elif not check_html_lint(): File "/mnt/c/Users/Logesh/Desktop/NodeJSWorks/shaka-player/build/check.py", line 69, in check_html_lint if not shakaBuildHelpers.update_node_modules(): File "/mnt/c/Users/Logesh/Desktop/NodeJSWorks/shaka-player/build/shakaBuildHelpers.py", line 270, in update_node_modules execute_get_output([cmd, 'install']) File "/mnt/c/Users/Logesh/Desktop/NodeJSWorks/shaka-player/build/shakaBuildHelpers.py", line 143, in execute_get_output raise subprocess.CalledProcessError(obj.returncode, args[0], stdout) subprocess.CalledProcessError: Command 'npm' returned non-zero exit status 1

@WORMSS
Copy link

WORMSS commented Jun 26, 2017

Wow those are hard to read.
You would be better off doing triple ` (backtick)

```sh
stuff
```

@joeyparrish
Copy link

@logeshhy, you seem to have two versions of node installed: /usr/local/bin/node and /usr/bin/nodejs. This seems to be the root of your problem.

Try this (untested):

sudo mv /usr/local/bin/node /root/backup-node-v8
sudo npm install -g n
sudo n stable
sudo mv /usr/bin/nodejs /root/backup-nodejs-v4

After this, you should only have one copy of node, and it should be up-to-date. I hope.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants