Skip to content

Installation not working 1.0.0-beta.11-webpack.3 #1883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hassanasad opened this issue Aug 30, 2016 · 8 comments
Closed

Installation not working 1.0.0-beta.11-webpack.3 #1883

hassanasad opened this issue Aug 30, 2016 · 8 comments

Comments

@hassanasad
Copy link

hassanasad commented Aug 30, 2016

  1. El Capitan
  2. ng --version giving error
    Node v4.4.7

I ran the commands:

sudo npm uninstall -g angular-cli
npm cache clean
sudo npm install -g angular-cli@webpack

After it ran the install process, now when i run any of the "NG" commands such as:
ng --version

I get the following errors:

Error while running script "/usr/local/lib/node_modules/angular-cli/addon/ng2/models/config/config.ts":
SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.require.extensions..ts (/usr/local/lib/node_modules/angular-cli/lib/bootstrap-local.js:30:14)
    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> (/usr/local/lib/node_modules/angular-cli/addon/ng2/models/config.ts:7:16)
    at Module._compile (module.js:409:26)
    at Object.require.extensions..ts (/usr/local/lib/node_modules/angular-cli/lib/bootstrap-local.js:30:14)
Error while running script "/usr/local/lib/node_modules/angular-cli/addon/ng2/models/config.ts":
SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.require.extensions..ts (/usr/local/lib/node_modules/angular-cli/lib/bootstrap-local.js:30:14)
    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> (/usr/local/lib/node_modules/angular-cli/addon/ng2/models/config.ts:7:16)
    at Module._compile (module.js:409:26)
    at Object.require.extensions..ts (/usr/local/lib/node_modules/angular-cli/lib/bootstrap-local.js:30:14)
/usr/local/lib/node_modules/angular-cli/addon/ng2/models/config/config.ts:23
        this._config = new (schema_class_factory_1.SchemaClassFactory(schema))(configJson, ...fallbacks);
                                                                                           ^^^

SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.require.extensions..ts (/usr/local/lib/node_modules/angular-cli/lib/bootstrap-local.js:30:14)
    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> (/usr/local/lib/node_modules/angular-cli/addon/ng2/models/config.ts:7:16)
    at Module._compile (module.js:409:26)
    at Object.require.extensions..ts (/usr/local/lib/node_modules/angular-cli/lib/bootstrap-local.js:30:14)

Did i miss some packages or something?

@hansl
Copy link
Contributor

hansl commented Aug 30, 2016

Unfortunately it seems like our strategy to build TypeScript on the fly does not support Node 4 (needs some ES6 features).

The proper solution will be to build TypeScript offline and publish that, which is coming soon. You'll have to be patient until then. I'll tag the PR with fixing this issue.

@renevall
Copy link

Now working on node 6.5

Just had to install again.

@webmobiles
Copy link

please update readme in order a lot of people use last node and npm version ,
actually on the home page shows:
The generated project has dependencies that require Node 4.x.x and NPM 3.x.x.

@hassanasad
Copy link
Author

I just installed:

  • node 6.5.0
  • npm 3.10.6
  • angular-cli@webpack (1.0.0-beta.11-webpack.8)

On my MAC (OS El Capitan)

Then i did ng new test-project

After downloading all the dependencies etc, when i do ng serve

I get dozens of errors like:

ERROR in [default] 
Cannot find global type 'Array'.

ERROR in [default] 
Cannot find global type 'Boolean'.

ERROR in [default] 
Cannot find global type 'Function'.

ERROR in [default] 
Cannot find global type 'IArguments'.

ERROR in [default] 
Cannot find global type 'Number'.

ERROR in [default] 
Cannot find global type 'Object'.

ERROR in [default] 
Cannot find global type 'RegExp'.

ERROR in [default] 
Cannot find global type 'String'.

Then i tried updating to RC6 - still the same issue
Is it a broken build ?

@goriunov
Copy link

goriunov commented Sep 3, 2016

I have the same Error Does any one know how to solve that .

@ohadgk
Copy link

ohadgk commented Sep 3, 2016

try to remove the "^" before the typescript version in your package.json.
should be "typescript": "2.0.0".

PowerKiKi added a commit to PowerKiKi/angular-cli that referenced this issue Sep 13, 2016
`ng --version` does not work on Node.js 4 anymore as reported in angular#1883
@filipesilva
Copy link
Contributor

The current latest beta.14 should have fixed all these issues. Please follow the upgrade instructions in https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.12.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
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

7 participants