angular2-meteor icon indicating copy to clipboard operation
angular2-meteor copied to clipboard

Error in tutorial step 0

Open ThomsCass opened this issue 10 years ago • 8 comments

Hi,

I followed the tutorial step 0 and before the typings part when I run meteor here are the errors I got. Beside the app doesn't start.

=> Started proxy.                             
=> Started MongoDB.                           
client/app.ts (3, 25): Cannot find module 'angular2/core'.
client/app.ts (4, 25): Cannot find module 'angular2/platform/browser'.
Compiling main app HTML file: client/index.html

Unable to resolve some modules:

  "crypto" in .../node_modules/reflect-metadata/Reflect.js (web.browser)
  "angular2/core" in .../client/app.js (web.browser)
  "angular2/platform/browser" in .../client/app.js (web.browser)

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

  meteor npm install --save meteor-node-stubs angular2

ThomsCass avatar May 08 '16 17:05 ThomsCass

ok so here are the line we need to change :

meteor npm install angular2-meteor-auto-bootstrap --save

import {Component} from '@angular/core';
import {bootstrap} from 'angular2-meteor-auto-bootstrap';

Then the app works !

However we still have some error messages :

=> Started proxy.                             
=> Started MongoDB.                           
Compiling main app HTML file: client/index.html

Unable to resolve some modules:

  "crypto" in .../node_modules/reflect-metadata/Reflect.js (web.browser)

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

  meteor npm install --save meteor-node-stubs 

=> Started your app.  

ThomsCass avatar May 08 '16 17:05 ThomsCass

Hi @ThomsCass,

Have you tried to install meteor-node-stubs?

Cheers, David

dapids avatar May 09 '16 12:05 dapids

Hi @dapids,

When you create a new project in meteor 1.3.2.4 it's already there. so yes I have it

ThomsCass avatar May 09 '16 12:05 ThomsCass

@ThomsCass,

Could you post your package.json, please?

dapids avatar May 10 '16 06:05 dapids

"dependencies": {
    "@angular/core": "^2.0.0-rc.1",
    "angular2-meteor": "^0.5.5",
    "angular2-meteor-auto-bootstrap": "^0.5.5",
    "es6-shim": "^0.35.0",
    "meteor-node-stubs": "~0.2.0",
    "reflect-metadata": "^0.1.2",
    "rxjs": "^5.0.0-beta.6",
    "zone.js": "^0.6.12"
  }

ThomsCass avatar May 10 '16 14:05 ThomsCass

I think it might be related to https://github.com/Urigo/angular2-meteor/issues/266.

dapids avatar May 10 '16 15:05 dapids

dup of https://github.com/Urigo/angular2-meteor/issues/266

barbatus avatar May 11 '16 15:05 barbatus

I've updated the tutorial to the latest RC

Urigo avatar May 14 '16 18:05 Urigo