Closed origin1tech closed 8 years ago
Nevermind looks like it needs Node 6.x
That said after running new command a vanilla project won't build. It throws a bunch of errors related to not finding globals. Going to rollback for the moment.
ERROR in [default] Cannot find name 'Object'
The above is thrown for Object, Array, Function etc...
Issue appears to be typescript version. lock out to version 2.0.0
change:
"typescript": "^2.0.0"
to:
"typescript": "2.0.0"
Based on my experience this am I would suggest the following config:
Node: 6.x Npm: 3.x angular-cli:
npm install angular-cli@1.0.0-beta.11-webpack.2 -g
typescript:
npm install typescript@2.0.0 -g
Also ensure that typescript in package.json dev dependencies is locked out as shown above.
when I create a project with angular-cli not app.module.ts file appears me, anyone know how to fix it?
@EdwinDennis are you saying that app.module.ts does not exist?
do not appear app.module.ts, the versions I have are these ,
node --version
v4.4.5
ng --version
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.10
node: 4.4.5
os: darwin x64
Looks like you need to the webpack version of angular-cli
npm install angular-cli@1.0.0-beta.11-webpack.2 -g
I don't believe the default angular-cli uses app.module.ts. At least not the last time I checked.
Be careful though if on an existing project as webpack works significantly different and makes use of the new @types for typescript.
thanks for the help, update and think the file
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.
El Capitan
ng --version
. If there's nothing outputted, please run in a Terminal:node --version
and paste the result here:node: 4.5.0
npm install angular-cli@webpack -g
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. (/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)
When running version .2 all was well after upgrade I get the above error.