Link to home
Start Free TrialLog in
Avatar of derrida
derrida

asked on

suddenly angular cli doesn't work.

Hi
when i start a new project with angular cli i get this error. didn't happened before, and i don't understand the error:
Unexpected token ...
SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (C:\xampp\htdocs\testangforme2\node_modules\@ngtools\json-schema\src\index.js:3:30)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (C:\xampp\htdocs\testangforme2\node_modules\angular-cli\models\config\config.js:9:21)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (C:\xampp\htdocs\testangforme2\node_modules\angular-cli\models\config.js:7:16)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (C:\xampp\htdocs\testangforme2\node_modules\angular-cli\addon\index.js:4:16)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Function.Addon.lookup (C:\xampp\htdocs\testangforme2\node_modules\angular-cli\ember-cli\lib\models\addon.js:209:19)
    at Project.initializeAddons (C:\xampp\htdocs\testangforme2\node_modules\angular-cli\ember-cli\lib\models\project.js:300:29)
    at Project.eachAddonCommand (C:\xampp\htdocs\testangforme2\node_modules\angular-cli\ember-cli\lib\models\project.js:354:10)
    at module.exports (C:\xampp\htdocs\testangforme2\node_modules\angular-cli\ember-cli\lib\cli\lookup-command.js:33:13)
    at CLI.<anonymous> (C:\xampp\htdocs\testangforme2\node_modules\angular-cli\ember-cli\lib\cli\cli.js:42:26)
    at tryCatch (C:\xampp\htdocs\testangforme2\node_modules\rsvp\dist\rsvp.js:538:12)
    at invokeCallback (C:\xampp\htdocs\testangforme2\node_modules\rsvp\dist\rsvp.js:553:13)
    at publish (C:\xampp\htdocs\testangforme2\node_modules\rsvp\dist\rsvp.js:521:7)
    at flush (C:\xampp\htdocs\testangforme2\node_modules\rsvp\dist\rsvp.js:2373:5)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)

all i did is:
ng new project name
and after it is done, run ng serve. then i get this.

any idea?
Avatar of derrida
derrida

ASKER

when i run ng --version i get:
angular-cli: 1.0.0-beta.26
node: 4.4.7
os: win32 x64
Avatar of Julian Hansen
Please take a look at this bug report

https://github.com/angular/angular-cli/issues/1946

Suggests upgrading to Node 6
Avatar of derrida

ASKER

hi
i have thinstalled this: https://github.com/felixrieseberg/npm-windows-upgrade
on the understanding that this will upgrade node
but as you can see the version is still 4.4.7
User generated image
how do i upgrade my node then?
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of derrida

ASKER

the simplest way, and it works