Skip to content

error on "scripts" > "start" #335

Open
@vqueja

Description

@vqueja

I am using this setup in my package.json:

"name": "angularspree",
"version": "0.0.1",
"license": "MIT",
"scripts": {
"ng": "./node_modules/@angular/cli/bin/ng",
"start-mock": "ng serve -H 0.0.0.0 --environment=mock",
"start": "cd dist && ../node_modules/live-server/live-server.js --port=8081 --host=localhost --entry-file=/index.html",
"build": "ng build",
"test": "echo 'no test'",
"lint": "",
"e2e": "node e2e/home.js",
"compodoc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json -d docs/",
"build--prod": "ng build --prod --no-sourcemap --stats-json && npm run sw",
"sw": "sw-precache --root=dist --config=sw-precache-config.js",
"static-serve": "cd dist && live-server --port=8081 --host=localhost --entry-file=/index.html"

During deployment, it fails due to this error:

[email protected] start /var/app/current
cd dist && ../node_modules/live-server/live-server.js --port=8081 --host=localhost --entry-file=/index.html

/var/app/current/node_modules/opn/index.js:11
const wslToWindowsPath = async path => {
^^^^

SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (/var/app/current/node_modules/live-server/index.js:11:9)

npm ERR! Linux 4.14.47-56.37.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.14.3-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v6.14.3-linux-x64/bin/npm" "start"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: cd dist && ../node_modules/live-server/live-server.js --port=8081 --host=localhost --entry-file=/index.html
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'cd dist && ../node_modules/live-server/live-server.js --port=8081 --host=localhost --entry-file=/index.html'.
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 angularspree package

This has not happened before though.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions