-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Latest Webpack version of CLI throws error #1887
Comments
try install |
have the same issue, but according to this thread #1883 you now need node6 and not node4 |
Updating node from 6.3.0 to 6.5.0 helped me too for this problem. |
to fix this u need go ng init, coz angular-cli.json was modify !! go ng init, and go yes only for angular-cli.json and polyfills.ts |
I' trying the new angular-cli: 1.0.0-beta.11-webpack.8 ... System: Mac OSX El Capitan $ ng --version Repro steps. Errors ERROR in [default] /Users/user/webProjects/test-angular2/webpack/node_modules/@angular/core/src/di/reflective_key.d.ts:18:11 ERROR in [default] /Users/user/webProjects/test-angular2/webpack/node_modules/@angular/core/src/di/reflective_key.d.ts:23:23 ERROR in [default] /Users/user/webProjects/test- ERROR in [default] /Users/user/webProjects/test-angular2/webpack/node_modules/@angular/core/src/di/reflective_provider.d.ts:71:13 ERROR in [default] /Users/user/webProjects/test-angular2/webpack/node_modules/@angular/core/src/di/reflective_provider.d.ts:80:17 |
This morning things were fine. Now when I create a project and run ng build or ng serve I observe all these errors. Running on a MacbookPro / El Capitan: Additional Note: The app runs, regardless. Kind of hard to debug though! |
Why in CHANGELOG.md the newest version is 1.0.0-beta.11-webpack.3 but everyone is installing 1.0.0-beta.11-webpack.8? |
[email protected] is what is installed with one installs angular-cli@webpack, which is recommended in the angular-cli installation page for RC5 / webpack. |
it is a moving target! Hopefully this is a better version. I'll check it out right now and let you know what I observe. |
I had really strange situation. I don't have any idea what just happened |
I love it! I just finished the same exercise and got |
OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)MacbookPRO / El Capitan $ node --version
v6.5.0
$ npm --version
3.10.3
$ 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.11-webpack.8
node: 6.5.0
os: darwin x64 Repro steps. Was this an app that wasn't created using the CLI? What change did youdo on your code? etc. $ ng build my_project
$ cd my_project
$ ng build The log given by the failure. Normally this include a stack trace and somemore information. This issue seems to be related to issue #1873 It has been suggested that upgrading to node 6.5.0 might solve the problem. Unfortunately, as shown by the logs below, this is not the case: $ node --version
v6.5.0
$ npm --version
3.10.3
$ 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.11-webpack.8
node: 6.5.0
os: darwin x64
$ ng build
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
1019ms building modules
1ms sealing
0ms optimizing
1ms basic module optimization
1ms module optimization
0ms advanced module optimization
2ms basic chunk optimization
1ms chunk optimization
0ms advanced chunk optimization
0ms module and chunk tree optimization
3ms module reviving
0ms module order optimization
0ms module id optimization
1ms chunk reviving
0ms chunk order optimization
1ms chunk id optimization
2ms hashing
0ms module assets processing
6ms chunk assets processing
1ms additional chunk assets processing
0ms recording
1ms additional asset processing
76ms chunk asset optimization
193ms asset optimization
4ms emitting
Hash: 8633515b4611dd25238a
Version: webpack 2.1.0-beta.21
Time: 1329ms
Asset Size Chunks Chunk Names
main.bundle.js 19.3 kB 0, 2 [emitted] main
styles.bundle.js 13 kB 1, 2 [emitted] styles
inline.js 5.53 kB 2 [emitted] inline
main.map 15.4 kB 0, 2 [emitted] main
styles.map 17.9 kB 1, 2 [emitted] styles
inline.map 5.59 kB 2 [emitted] inline
index.html 481 bytes [emitted]
assets/.npmignore 0 bytes [emitted]
chunk {0} main.bundle.js, main.map (main) 13.8 kB {1} [initial] [rendered]
chunk {1} styles.bundle.js, styles.map (styles) 12.7 kB {2} [initial] [rendered]
chunk {2} inline.js, inline.map (inline) 0 bytes [entry] [rendered]
ERROR in ./src/main.ts
Module not found: Error: Can't resolve '@angular/platform-browser-dynamic' in '/Users/silveir/Projects/studies/ng2_router/src'
@ ./src/main.ts 2:0-75
@ multi main
.... many more errors of this nature Mention any other details that might be useful.Ive tried the steps above with many different typescript versions |
I was able to solve this problem with the following configuration: Upgrade imy tools node --version
v6.5.0
$ npm --version
3.10.3
$ 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.11-webpack.8
node: 6.5.0
os: darwin x64
$ npm list -g
/usr/local/lib
├─┬ [email protected]
│ ├── @angular-cli/[email protected]
...
├── [email protected]
.... Changed "typescript": "^2.0.0"
|
Thanks @dematic-rodrigo-silveira Now i've upgraded the structure of my project comparing folders and files from a fresh ng new project, there are several differences.
|
Thanks @dematic-rodrigo-silveira also, as @kurtommy said, no more typings errors appear. With:
it works perfectly, as expected. With:
MS Studio Code reports some problems (although it is compiled ok):
¿Any idea? |
As it was mentioned before you should do next steps to fix this bug:
For me it works good. |
Nop. |
When the next version of CLI likely to come out? |
Closing as obsolete. @siva636 please try the latest beta.14. The Errors in your editors are because they might not support typescript 2.0.0 yet, there might be a way to configure the editor but it varies. For other problems please open separate issues. |
Now (beta.14) it is working ok (like beta.10) with MS Visual Code. |
I think the error is stable (ng serve, ng build) repeats when name of the parent folder have somewhere symbol ! (ex. C:/!my-folder). When I renamed it (C:/my-folder) I got success. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Ubuntu latest 16.04 LTS
ng --version
. If there's nothing outputted, please runWhen run
ng --version
the following error comes:siva@siva:~$ ng --version Error while running script "/home/siva/Applications/node-v4.4.3-linux-x86/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 (/home/siva/Applications/node-v4.4.3-linux-x86/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> (/home/siva/Applications/node-v4.4.3-linux-x86/lib/node_modules/angular-cli/addon/ng2/models/config.ts:7:16) at Module._compile (module.js:409:26) at Object.require.extensions..ts (/home/siva/Applications/node-v4.4.3-linux-x86/lib/node_modules/angular-cli/lib/bootstrap-local.js:30:14)
in a Terminal:
node --version
and paste the result here:do on your code? etc.
more information.
The text was updated successfully, but these errors were encountered: