ng beta 30 fails
OS Windows 7
@angular/cli: 1.0.0-beta.30
'ng help' causes:
Cannot find module 'rxjs/symbol/observable'
Error: Cannot find module 'rxjs/symbol/observable'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at globalScope (C:\Users\Kevin\AppData\Roaming\npm\node_modules@angular\cli
\node_modules@angular\core\bundles\core.umd.js:7:85)
at Object.
During installation rxjs came up as an unmet dependency
Same issue. This only happens when you try to compile a project that was created with an older version of cli. I have not been able to find the cause of this.
In the meantime just make new project and copy paste your components etc. to the new project.
I am receiving the same issue as well after running npm install -g @angular/cli and then running ng help , I tried a npm install rxjs-es but still getting that error, perhaps it's no longer bundled?
Have you guys tried npm install -g rxjs?
@AmarildoK But I didn't try to compile the project just invoked 'ng help'?
I got the same result, then tried markgoho's suggestion. After npm install -g rxjs I was able to ng help and ng new, but I could not ng serve the new Angular project. I came up with quite a long error output:
PS C:\ng\testapp> ng serve
** NG Live Development Server is running on http://localhost:4200. **
Hash: 6a38e9bf99d82af8f7ee
Time: 1192ms
chunk {0} styles.bundle.js, styles.bundle.map (styles) 28 bytes {3} [initial] [rendered]
chunk {1} polyfills.bundle.js, polyfills.bundle.map (polyfills) 28 bytes {3} [initial] [rendered]
chunk {2} main.bundle.js, main.bundle.map (main) 40 bytes [initial] [rendered]
chunk {3} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered]
ERROR in multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts
Module not found: Error: Can't resolve 'webpack-dev-server/client?http://localhost:4200/' in 'C:\ng\testapp'
@ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts
ERROR in multi ./src/styles.css
Module not found: Error: Can't resolve 'style-loader' in 'C:\ng\testapp'
@ multi ./src/styles.css
ERROR in multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts
Module not found: Error: Can't resolve '@ngtools/webpack' in 'C:\ng\testapp'
@ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts
ERROR in multi ./src/polyfills.ts
Module not found: Error: Can't resolve '@ngtools/webpack' in 'C:\ng\testapp'
@ multi ./src/polyfills.ts
ERROR in Error: Child compilation failed:
Entry module not found: Error: Can't resolve 'raw-loader' in 'C:\ng\testapp':
Error: Can't resolve 'raw-loader' in 'C:\ng\testapp'
Continues on for a bit
I upgraded to .30 on ubuntu 16.04 and created new project
run ng serve and got
Error: Cannot find module '@ngtools/json-schema'
after fixing that I'm stuck with:
ERROR in ./src/main.ts Module build failed: TypeError: Cannot read property 'newLine' of undefined [...] ERROR in ./src/polyfills.ts Module build failed: TypeError: Cannot read property 'newLine' of undefined [...]
In case it matters, running node v7.5.0 and npm v4.2.0
I got same issue. update Package.json :
"devDependencies": {
"@angular/cli": "1.0.0-beta.30",
"@angular/compiler-cli": "^2.3.1",
resolve it. and got this waring: fallbackLoader option has been deprecated - replace with "fallback"
I pushed changes to my ng2 D3 scaffold project. https://github.com/dahang/d3-angular2-app.git
I made a back up of my source code and package.json / angular-cli.json changes und ran ng init within the buggy project. Follow the init process and replace everything. Now apply your back up to the new project and run ng serve. It should work from now.
Maybe there will be still some missing dependencies which were dropped by the ng init. Add them to your package.json and re-run npm i. Don't forget to change your project settings in angular-cli.json if needed.
I followed @dahang instructions and changed the dev dependencies and it works. Though I don't seem to get the warning that dahang describes.
For me it did not work. I wanted this update as a solution to .ts file recompile issue, but I managed to solve it by downgrading cli to beta 28.3 and webpack to 1.2.4
For the warnings indicated by @dahang , I think that line 90 in models/webpack-configs/styles.js should be replaced with:
use: [
and line 95 with:
fallback: 'style-loader',
Options loader and fallbackLoader are deprecated in a newer version of the library extract-text-webpack-plugin, given that is specified like this:
"extract-text-webpack-plugin": "^2.0.0-rc.1",
There is now a PR to fix the loader warnings: https://github.com/angular/angular-cli/pull/4435
Steps to resolve Issue,
- Uninstalled angular cli
npm uninstall @angular/cli -g - Installed rxJS
npm install rxjs -g - Cleared cache
npm cache clean - Installed angular cli
npm install @angular/cli -g
I have many projects based on angular-cli.
I did upgrade one of them and when I decided to work on the other I had this error.
The thing is, I upgraded angular-cli globally from angular-cli.beta.28-3 to @angular/cli beta 30 when I upgraded the first project.
Once I upgraded my second project to @angular/cli beta.30, everything was working just fine :+1:
I updated the package, so the devDep is @angular/cli beta 30. Removed my node_modules folder and did a fresh NPM install. Worked for my team members and me.
The first line says
Cannot find module 'rxjs/symbol/observable'
Error: Cannot find module 'rxjs/symbol/observable'
use npm install -g rxjs to install rxjs globally. Use sudo if using linux, this should work.
For anyone getting TypeError: Cannot read property 'kind' of undefined, You can fix it by adding :any to my @Inject() params in constructors as suggested here: https://github.com/angular/angular-cli/issues/4427#issuecomment-277422798
If you go to https://cli.angular.io/ it states there to perform this installation:
npm install -g angular-cli.
That way, its dependencies are properly fetched and installed, too.
@catull We need to fix cli-dot-angular-dot-io, please do not link there for the time being.
@catull From what I understand angular cli is moving its npm to @angular/cli so that wont work anymore. Thats why on the angular-cli github they tell you to uninstall/upgrade the cli by doing npm uninstall angular-cli @angular/cli