After updating to the latest beta 10 to support NG5, I started getting a massive error stack in when using the cli to compile the project
ERROR in ./src/app/app.module.ngfactory.js
Module not found: Error: Can't resolve '@angular/flex-layout/flexbox/_module' in '/Users/ricardo_varanda/Projects/ProductCloudUI/src/app'
resolve '@angular/flex-layout/flexbox/_module' in '/Users/ricardo_varanda/Projects/ProductCloudUI/src/app'
Parsed request is a module
using description file: /Users/ricardo_varanda/Projects/ProductCloudUI/package.json (relative path: ./src/app)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Users/ricardo_varanda/Projects/ProductCloudUI/package.json (relative path: ./src/app)
resolve as module
/Users/ricardo_varanda/Projects/ProductCloudUI/src/app/node_modules doesn't exist or is not a directory
/Users/ricardo_varanda/Projects/ProductCloudUI/src/node_modules doesn't exist or is not a directory
/Users/node_modules doesn't exist or is not a directory
```
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular CLI: 1.5.0
Node: 6.10.3
OS: darwin x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cdk: 2.0.0-beta.12
@angular/cli: 1.5.0
@angular/flex-layout: 2.0.0-beta.10
@angular/material: 2.0.0-beta.12
@angular/service-worker: 1.0.0-beta.16
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.0
typescript: 2.5.3
webpack: 3.8.1
```
Bug, feature request, or proposal:
I have the same problem :-(
ERROR in ./node_modules/@angular/flex-layout/esm5/flex-layout.es5.js
Module not found: Error: Can't resolve 'rxjs/operators' in '/home/tailot/Progetti/omissis/node_modules/@angular/flex-layout/esm5'
resolve 'rxjs/operators' in '/home/tailot/Progetti/omissis/node_modules/@angular/flex-layout/esm5'
Parsed request is a module
using description file: /home/tailot/Progetti/omissis/node_modules/@angular/flex-layout/package.json (relative path: ./esm5)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /home/tailot/Progetti/omissis/node_modules/@angular/flex-layout/package.json (relative path: ./esm5)
resolve as module
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular CLI: 1.5.0
Node: v6.9.5
OS: Debian 8.9
Angular: 5.0.0
` "@angular/animations": "^5.0.0",
"@angular/cdk": "^2.0.0-beta.12",
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/flex-layout": "^2.0.0-beta.10",
"@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0",
"@angular/material": "^2.0.0-beta.12",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/platform-server": "^5.0.0",
"@angular/router": "^5.0.0",
"typescript": "~2.4.2"
Something to note is that changing the version back to beta 8 fixes and fixes the compilation but the layouts at run time are broken.
@RicardoVaranda Updating Rxjs to 5.5.x should solve this!
Think we may be facing different issues as mine is already at 5.5.2 馃槥
Fixed, issue was due to flex-layout being a hard dependency of a third party lib (ngx-ui) which caused it to have 2 different versions installed.
I'm getting this for all material components. But I don't even have flex-layout in my app
But the weird thing is that at work today all was fine (same environment).
Now got home, done a git pull, rm -rf node_modules and npm install
Now, ng build generates this error.
Tried npm cache clean --force... nothing.
Also, don't know why, the package-lock.json changes weirdly. What do I mean by that: I remove package-lock.json then npm install and then it generates a new one. Then, I delete it, remove node_modules, then npm install again and the new package-lock.json looks different than the one from the previous install, which I've just deleted.
Very weird, but I guess this means it might not be related to flex-layout.
Node: 8.9.1
Npm: 5.5.1
OS: Bash on Ubuntu on Windows
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._
Most helpful comment
I'm getting this for all material components. But I don't even have flex-layout in my app
But the weird thing is that at work today all was fine (same environment).
Now got home, done a git pull,
rm -rf node_modulesandnpm installNow,
ng buildgenerates this error.Tried
npm cache clean --force... nothing.Also, don't know why, the
package-lock.jsonchanges weirdly. What do I mean by that: I removepackage-lock.jsonthennpm installand then it generates a new one. Then, I delete it, remove node_modules, thennpm installagain and the new package-lock.json looks different than the one from the previous install, which I've just deleted.Very weird, but I guess this means it might not be related to flex-layout.
Node: 8.9.1
Npm: 5.5.1
OS: Bash on Ubuntu on Windows