robwormald / ng-universal-demo

256 stars 125 forks source link

Could not resolve @angular/animations/browser #30

Open splincode opened 7 years ago

splincode commented 7 years ago
splincode@splincode-linux:~/Develop/meetup/2017/july/ng/examples/universal/ng-universal-demo$ npm start

> ng-universal-demo@1.0.0 start /home/splincode/Develop/meetup/2017/july/ng/examples/universal/ng-universal-demo
> npm run build && npm run server

> ng-universal-demo@1.0.0 build /home/splincode/Develop/meetup/2017/july/ng/examples/universal/ng-universal-demo
> webpack -p

Hash: 72d556782d1ef424c662
Version: webpack 2.6.1
Time: 12703ms
  Asset    Size  Chunks                    Chunk Names
main.js  1.1 MB       0  [emitted]  [big]  main
   [2] ./~/rxjs/Observable.js 11.4 kB {0} [built]
   [6] ./~/@angular/core/@angular/core.es5.js 487 kB {0} [built]
  [10] ./~/tslib/tslib.es6.js 7.83 kB {0} [built]
  [20] ./~/rxjs/Subject.js 5.61 kB {0} [built]
  [65] ./src/ngfactory lazy 160 bytes {0} [built]
  [67] ./src/express-engine.ts 712 bytes {0} [built]
  [68] ./~/express/index.js 224 bytes {0} [built]
  [69] ./~/zone.js/dist/zone-node.js 76.3 kB {0} [built]
  [73] ./~/@angular/platform-server/@angular/platform-server.es5.js 73.5 kB {0} [built]
  [74] ./src/main.server.ts 735 bytes {0} [built]
  [88] ./~/express/lib/express.js 2.22 kB {0} [built]
 [126] ./~/rxjs/SubjectSubscription.js 1.4 kB {0} [built]
 [131] ./~/rxjs/observable/merge.js 128 bytes {0} [built]
 [137] ./~/rxjs/operator/share.js 923 bytes {0} [built]
 [147] ./~/rxjs/util/toSubscriber.js 760 bytes {0} [built]
    + 147 hidden modules

WARNING in ./~/express/lib/view.js
80:29-41 Critical dependency: the request of a dependency is an expression

ERROR in Error encountered resolving symbol values statically. Could not resolve @angular/animations/browser relative to /home/splincode/Develop/meetup/2017/july/ng/examples/universal/ng-universal-demo/node_modules/@angular/platform-browser/animations/index.d.ts., resolving symbol ɵf in /home/splincode/Develop/meetup/2017/july/ng/examples/universal/ng-universal-demo/node_modules/@angular/platform-browser/animations/index.d.ts, resolving symbol BrowserAnimationsModule in /home/splincode/Develop/meetup/2017/july/ng/examples/universal/ng-universal-demo/node_modules/@angular/platform-browser/animations/index.d.ts, resolving symbol BrowserAnimationsModule in /home/splincode/Develop/meetup/2017/july/ng/examples/universal/ng-universal-demo/node_modules/@angular/platform-browser/animations/index.d.ts

ERROR in /home/splincode/Develop/meetup/2017/july/ng/examples/universal/ng-universal-demo/src/main.server.ts (5,42): Cannot find module './ngfactory/src/app.server.ngfactory'.

ERROR in ./src/main.server.ts
Module not found: Error: Can't resolve './ngfactory/src/app.server.ngfactory' in '/home/splincode/Develop/meetup/2017/july/ng/examples/universal/ng-universal-demo/src'
 @ ./src/main.server.ts 3:0-80

ERROR in ./~/@angular/platform-server/@angular/platform-server.es5.js
Module not found: Error: Can't resolve '@angular/animations/browser' in '/home/splincode/Develop/meetup/2017/july/ng/examples/universal/ng-universal-demo/node_modules/@angular/platform-server/@angular'
 @ ./~/@angular/platform-server/@angular/platform-server.es5.js 9:0-63
 @ ./src/express-engine.ts
 @ ./src/main.server.ts

ERROR in ./~/@angular/platform-browser/@angular/platform-browser/animations.es5.js
Module not found: Error: Can't resolve '@angular/animations/browser' in '/home/splincode/Develop/meetup/2017/july/ng/examples/universal/ng-universal-demo/node_modules/@angular/platform-browser/@angular/platform-browser'
 @ ./~/@angular/platform-browser/@angular/platform-browser/animations.es5.js 10:0-206
 @ ./~/@angular/platform-server/@angular/platform-server.es5.js
 @ ./src/express-engine.ts
 @ ./src/main.server.ts

ERROR in ./~/@angular/platform-browser/@angular/platform-browser/animations.es5.js
Module not found: Error: Can't resolve '@angular/animations' in '/home/splincode/Develop/meetup/2017/july/ng/examples/universal/ng-universal-demo/node_modules/@angular/platform-browser/@angular/platform-browser'
 @ ./~/@angular/platform-browser/@angular/platform-browser/animations.es5.js 9:0-83
 @ ./~/@angular/platform-server/@angular/platform-server.es5.js
 @ ./src/express-engine.ts
 @ ./src/main.server.ts
can-cc commented 7 years ago

+1

pankajmi commented 7 years ago

+1

MarkPieszak commented 7 years ago

If you guys can, try out the demo with client & server rendering here: https://github.com/FrozenPandaz/ng-universal-demo (based on this one of course).

Can you install and add to your dependencies @angular/animations. Also you need to include NoOpAnimationModule in your NgModule for platform-server now.