Angular-meteor tutorial

typescript
meteor
angular

#1

I’m trying to follow the angular2-meteor tutorial: http://www.angular-meteor.com/tutorials/socially/angular2/bootstrapping. But when running “meteor --port $IP:$PORT” I got those messages:

[[[[[ ~/workspace ]]]]]

=> Started proxy.
=> Started MongoDB.
client/app.ts (2, 33): Cannot find module ‘@angular/core’.
client/app.ts (3, 27): Cannot find module ‘@angular/platform-browser-dynamic’.
client/app.ts (5, 22): Cannot find module ‘./app.html’.

Unable to resolve some modules:

“reflect-metadata” in /home/ubuntu/workspace/client/app.ts (web.browser)
"@angular/core" in /home/ubuntu/workspace/client/app.ts (web.browser)
"@angular/platform-browser-dynamic" in /home/ubuntu/workspace/client/app.ts (web.browser)

If you notice problems related to these missing modules, consider running:

meteor npm install --save reflect-metadata @angular

=> Started your app.

=> App running at: http://0.0.0.0:8080/

I cant see the “Hello World!”

Inspecting the page in the browser I can get this message:

Uncaught Error: Cannot find module ‘angular2-meteor-polyfills/browser’

Thanks for your help


#2

Did you try running that meteor npm install --save reflect-metadata @angular command it mentions?


#3

Ofcourse I did. But doesnt work.
Look at the console log:

npm ERR! addLocal Could not install /home/ubuntu/workspace/@angular
npm ERR! Linux 4.2.0-c9
npm ERR! argv “node” “/home/ubuntu/.meteor/packages/meteor-tool/.1.3.5_1.1sksnpz++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm” “install” “–save” “reflect-metadata” "@angular"
npm ERR! node v0.10.46
npm ERR! npm v3.10.5
npm ERR! path /home/ubuntu/workspace/@angular
npm ERR! code ENOENT
npm ERR! errno 34

npm ERR! enoent ENOENT, open '/home/ubuntu/workspace/@angular
npm ERR! enoent ENOENT, open '/home/ubuntu/workspace/@angular
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/workspace/npm-debug.log


#4

ENOENT means it expected that directory to exist but it doesn’t. Try doing mkdir @angular in your workspace folder then running that command again.


#5

Solved!

Just installed using this command:

meteor npm install --save reflect-metadata @angular/core @angular/compiler @angular/common @angular/platform-browser @angular/platform-browser-dynamic rxjs@5.0.0-beta.6 zone.js@0.6.12


#6

tip from https://github.com/angular/angular/blob/master/CHANGELOG.md#200-rc0-2016-05-02