Serve: Error when running `serve`

Created on 7 Jun 2018  路  2Comments  路  Source: vercel/serve

Just installed globally as instructed (albeit with npm not yarn)

OS: Windows 10 pro 64bit.
Git Bash Terminal

$ cd ~/Documents/work/OpsDash/

andrew.hayes@AWLT10979 MINGW32 ~/Documents/work/OpsDash (master)
$ serve
C:\Users\andrew.hayes\AppData\Roaming\npm\node_modules\serve\bin\serve.js:27
const updateCheck = async isDebugging => {
                          ^^^^^^^^^^^
SyntaxError: Unexpected identifier
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:390:7)
    at startup (bootstrap_node.js:150:9)

andrew.hayes@AWLT10979 MINGW32 ~/Documents/work/OpsDash (master)
$

Most helpful comment

upgraded... still getting error.

$ nodist 8.12.0
8.12.0
zenobius@JADAKREN ~\Projects\Mine\rancheros-server-setup
$ nodist
  (x64)
  4.2.4
  4.4.7
  4.6.0
  4.6.1
  4.7.2
  6.6.0
  6.7.0
  6.9.1
  6.11.2
  7.2.1
  7.4.0
  8.2.1
> 8.12.0  (global: 8.12.0)
zenobius@JADAKREN ~\Projects\Mine\rancheros-server-setup
$ node -v
v8.12.0
zenobius@JADAKREN ~\Projects\Mine\rancheros-server-setup
$ npx serve
Unexpected token (
zenobius@JADAKREN ~\Projects\Mine\rancheros-server-setup
$ npm i -g serve
C:\Program Files (x86)\Nodist\bin\serve -> C:\Program Files (x86)\Nodist\bin\node_modules\serve\bin\serve.js
C:\Program Files (x86)\Nodist\bin
`-- [email protected]

zenobius@JADAKREN ~\Projects\Mine\rancheros-server-setup
$ serve
C:\Program Files (x86)\Nodist\bin\node_modules\serve\bin\serve.js:32
const updateCheck = async (isDebugging) => {
                          ^
SyntaxError: Unexpected token (
    at Object.exports.runInThisContext (vm.js:78:16)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:420:7)
    at startup (bootstrap_node.js:139:9)
    at bootstrap_node.js:535:3

All 2 comments

Please upgrade your Node.js 馃槉 We only support Node.js LTS!

upgraded... still getting error.

$ nodist 8.12.0
8.12.0
zenobius@JADAKREN ~\Projects\Mine\rancheros-server-setup
$ nodist
  (x64)
  4.2.4
  4.4.7
  4.6.0
  4.6.1
  4.7.2
  6.6.0
  6.7.0
  6.9.1
  6.11.2
  7.2.1
  7.4.0
  8.2.1
> 8.12.0  (global: 8.12.0)
zenobius@JADAKREN ~\Projects\Mine\rancheros-server-setup
$ node -v
v8.12.0
zenobius@JADAKREN ~\Projects\Mine\rancheros-server-setup
$ npx serve
Unexpected token (
zenobius@JADAKREN ~\Projects\Mine\rancheros-server-setup
$ npm i -g serve
C:\Program Files (x86)\Nodist\bin\serve -> C:\Program Files (x86)\Nodist\bin\node_modules\serve\bin\serve.js
C:\Program Files (x86)\Nodist\bin
`-- [email protected]

zenobius@JADAKREN ~\Projects\Mine\rancheros-server-setup
$ serve
C:\Program Files (x86)\Nodist\bin\node_modules\serve\bin\serve.js:32
const updateCheck = async (isDebugging) => {
                          ^
SyntaxError: Unexpected token (
    at Object.exports.runInThisContext (vm.js:78:16)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:420:7)
    at startup (bootstrap_node.js:139:9)
    at bootstrap_node.js:535:3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lightzane picture lightzane  路  5Comments

malinda1986 picture malinda1986  路  6Comments

nermin99 picture nermin99  路  3Comments

Simran-B picture Simran-B  路  4Comments

leo picture leo  路  5Comments