Closed AnasSharif closed 8 years ago
What is the exact error?
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
do on your code? etc. Using the above configuration I executed the following steps
$ ng build my_project
$ cd my_project
$ ng build
more 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
Ive tried the steps above with many different typescript versions
Try ng init and look over the merge files again to check the package.json file. You should have the RC5 version of @angular/platform-browser-dynamic installed so you can get the correct browser module.
I did, it does not solve the problem:
$ cat package.json
{
"name": "ng2-router",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"lint": "tslint \"src/**/*.ts\"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "2.0.0-rc.5",
"@angular/compiler": "2.0.0-rc.5",
"@angular/core": "2.0.0-rc.5",
"@angular/forms": "0.3.0",
"@angular/http": "2.0.0-rc.5",
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"@angular/router": "3.0.0-rc.1",
"core-js": "^2.4.0",
"rxjs": "5.0.0-beta.11",
"ts-helpers": "^1.1.1",
"zone.js": "0.6.12"
},
"devDependencies": {
"@types/jasmine": "^2.2.30",
"angular-cli": "1.0.0-beta.11-webpack.8",
"codelyzer": "~0.0.26",
"jasmine-core": "2.4.1",
"jasmine-spec-reporter": "2.5.0",
"karma": "0.13.22",
"karma-chrome-launcher": "0.2.3",
"karma-jasmine": "0.3.8",
"karma-remap-istanbul": "^0.2.1",
"protractor": "4.0.3",
"ts-node": "1.2.1",
"tslint": "3.13.0",
"typescript": "^2.0.0"
}
}
Good News. Replacing "typescript": "^2.0.0"
with "typescript": "2.0.0"
worked!
Congrats!
On Wednesday, 31 August 2016, Rodrigo Silveira notifications@github.com wrote:
Good News. Replacing "typescript": "^2.0.0" with "typescript": "2.0.0" worked!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular/angular-cli/issues/1919#issuecomment-243815890, or mute the thread https://github.com/notifications/unsubscribe-auth/AEUSGiQg7iGCjb_JmeNN97ZQiqAnYzKSks5qlaf0gaJpZM4JxlAo .
For the record, this is my current configuration
$ 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
├─┬ angular-cli@1.0.0-beta.11-webpack.8
│ ├── @angular-cli/ast-tools@1.0.0
...
├── typescript@2.0.0
....
So, does "1.0.0-beta.11-webpack.8" is "the version" @dematic-rodrigo-silveira ? Does it work fine for you? What OS? I need basic stuff working to showcase new stuff like NgModule and webpack. Will that version do?
I tried previous version and there was problems with typescript. It either complained with npm. Updated to 3 and worked, but then when I did "ng serve" app started with a lot of errors in console for missing type definitions 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'.
and so on.. tried adding typing with triple slash reference, tried using typings in tsconfig, tried changing typings/*.. but nothing helped..
What are steps to get Webpack rc5 with TS2.0 working ?
Thanks Much :-)
What we have at the moment is a fluid situation; until it settles we will be experimenting and sharing our observations, as I'm doing on this post. To clarify, after upgrading to 1.0.0-beta.11-webpack.8
recently I, and many others in the community, experienced variety of errors, mostly characterized by error messages during ng build
and ng serve
indicating that basic modules like @agular/core
could not be found. Earlier this morning, collecting notes recorded in issues in this project, I cobbled an environment that is working for me:
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
├─┬ angular-cli@1.0.0-beta.11-webpack.8
│ ├── @angular-cli/ast-tools@1.0.0
...
├── typescript@2.0.0
....
Changed typescript": "^2.0.0"
to "typescript": "2.0.0"
in my packages.json
$ rm -rf node_modules dist tmp typings
$ npm install --save-dev angular-cli@webpack
Good luck!
Now that the newly released RC6 requires typescript 2.0.2, angular-cli will not work with it until it also supports 2.0.2
@billdwhite - You say that RC6 requires 2.0.2, can we still use RC5 with 2.0.0? I'm struggling with this same problem and had it working with RC5, but now that I'm trying to set it up on another Windows machine I can't get it to build.
The original issue seems to be a dupe of https://github.com/angular/angular-cli/issues/1919#issuecomment-243763329.
Not really sure where the followup replies came from since the main post contains 0 information, but please open new issues if your problems persist.
The typescript@2.0.2 issue was fixed though.
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.