datatypevoid / vulgar

A simple and scalable MEAN stack development kit featuring Angular 2 (Router, Http, Forms, Services, Tests, E2E, Coverage, Dev/Prod), Express, MongoDB, Mongoose, Node, PassportJS, Socket.io, Karma, Protractor, Jasmine, Istanbul, SASS Support, TypeScript, TSLint, NG2Lint, Hot Module Replacement, Docco, Gulp, and Webpack by @datatypevoid
MIT License
286 stars 66 forks source link

Error: Cannot resolve module 'rxjs/BehaviorSubject' #5

Closed fverswijver closed 8 years ago

fverswijver commented 8 years ago

Note: for support questions, please use one of these channels: Chat: VulgarDisplayOf2^2.slack or Twitter: @datatype_void

ERROR in ./~/@ngrx/store/store.js
Module not found: Error: Cannot resolve module 'rxjs/BehaviorSubject' in C:\Coding\mean-stack\node_modules\@ngrx\store
resolve module rxjs/BehaviorSubject in C:\Coding\mean-stack\node_modules\@ngrx\store
  looking for modules in C:\Coding\mean-stack\src
    C:\Coding\mean-stack\src\rxjs doesn't exist (module as directory)
  looking for modules in C:\Coding\mean-stack\node_modules
    resolve 'file' or 'directory' BehaviorSubject in C:\Coding\mean-stack\node_modules\rxjs
      resolve file
        C:\Coding\mean-stack\node_modules\rxjs\BehaviorSubject doesn't exist
        C:\Coding\mean-stack\node_modules\rxjs\BehaviorSubject.ts doesn't exist
        C:\Coding\mean-stack\node_modules\rxjs\BehaviorSubject.js doesn't exist
        C:\Coding\mean-stack\node_modules\rxjs\BehaviorSubject.scss doesn't exist
      resolve directory
        C:\Coding\mean-stack\node_modules\rxjs\BehaviorSubject doesn't exist (directory default file)
        C:\Coding\mean-stack\node_modules\rxjs\BehaviorSubject\package.json doesn't exist (directory description file)
[C:\Coding\mean-stack\src\rxjs]
[C:\Coding\mean-stack\node_modules\rxjs\BehaviorSubject]
[C:\Coding\mean-stack\node_modules\rxjs\BehaviorSubject.ts]
[C:\Coding\mean-stack\node_modules\rxjs\BehaviorSubject.js]
[C:\Coding\mean-stack\node_modules\rxjs\BehaviorSubject.scss]
 @ ./~/@ngrx/store/store.js 7:24-55

ERROR in ./~/@ngrx/store/ng2.js
Module not found: Error: Cannot resolve module '@angular/core' in C:\Coding\mean-stack\node_modules\@ngrx\store
resolve module @angular/core in C:\Coding\mean-stack\node_modules\@ngrx\store
  looking for modules in C:\Coding\mean-stack\src
    C:\Coding\mean-stack\src\@angular doesn't exist (module as directory)
  looking for modules in C:\Coding\mean-stack\node_modules
    C:\Coding\mean-stack\node_modules\@angular doesn't exist (module as directory)
[C:\Coding\mean-stack\src\@angular]
[C:\Coding\mean-stack\node_modules\@angular]
 @ ./~/@ngrx/store/ng2.js 2:13-37

ERROR in [default] C:/Coding/mean-stack/node_modules/@ngrx/store/ng2.d.ts:1:38
Cannot find module '@angular/core'.

ERROR in [default] C:/Coding/mean-stack/node_modules/@ngrx/store/store.d.ts:2:32
Cannot find module 'rxjs/BehaviorSubject'.
atamas101 commented 8 years ago

I just ran into a similar problem. I suspect it's because "npm install" didn't install angular dependencies for vulgar: i got the following when running npm install

`vulgar@1.2.0 /Users//work/experiments/mean-ng2/TestApp

├── UNMET PEER DEPENDENCY @angular/common@^2.0.0-rc.0

├── UNMET PEER DEPENDENCY @angular/core@^2.0.0-rc.0

├─┬ mongoose@4.4.15

│ └─┬ mongodb@2.1.18

│ └── es6-promise@3.0.2

└── UNMET PEER DEPENDENCY rxjs@5.0.0-beta.2`

datatypevoid commented 8 years ago

At the end of a long work week, but I'll take a look this evening. Thanks for the heads up guys.

atamas101 commented 8 years ago

@fverswijver if you apply these changes https://github.com/datatypevoid/vulgar/pull/6/files , delete node_modules and run again npm install, then the build will run and app will work ok. The problem was that npm was installing newer versions of some dependencies and those required angular2-rc* as a dependency, which has moved suff around since the beta-12 release which is installed and required by this generator. not sure if my fix will be merged, as ideally an upgrade for everything should be applied, but i'm not yet sure how to do that without breaking things more.

62tae commented 8 years ago

Thank you guys! I'm newbie here. I had the same problem, I finally solve this with your help. but, It crash with 'angular-meterials' and show like this.

2016-05-10 8 09 26
atamas101 commented 8 years ago

The UI looks the same for me too. I wasn't sure how it was supposed to look anyway, but that doesn't bother me yet, as I plan to build my own. Besides looking bad, the app is fully working for me though: the todo and recipe pages do what you would expect, so it's a good starting point. I would open a separate issue for this if it's a problem.

62tae commented 8 years ago

Yeah. It's a good starting point to me. Thank you guys. :)

datatypevoid commented 8 years ago

Sorry it's ugly lol. I put zero effort into styling it since it is just a starting point, but I plan on restyling it with Angular Material relatively soon once I move everything to the latest RC.

rahulgupta1210 commented 6 years ago

node_modules/@angular-redux/store/lib/src/components/ng-redux.d.ts(2,10): error TS2305: Module '"E:/Angular_Redux/angularredux/node_modules/rxjs/Observable"' has no exported member 'Observable'. node_modules/@angular-redux/store/lib/src/components/ng-redux.d.ts(37,14): error TS2416: Property 'dispatch' in type 'NgRedux' is not assignable to the same property in base type 'ObservableStore'. Type 'Dispatch' is not assignable to type 'Dispatch'. Type 'RootState' is not assignable to type 'AnyAction'.

I am getting this error .Need help?

jasminejeane commented 6 years ago

This is a known limitation that isn't well published, but you'll need to try adding the https://www.npmjs.com/package/rxjs-compat package to help with these import issues. This is a preview of our schematics, which we'll be updating very soon for standalone v6 compatibility (see PR #2238).

https://github.com/vmware/clarity/issues/2239#issuecomment-386587142