Coder Social home page Coder Social logo

Lots of warnings? about mfe-starter HOT 17 CLOSED

patrickjs avatar patrickjs commented on May 1, 2024
Lots of warnings?

from mfe-starter.

Comments (17)

PatrickJS avatar PatrickJS commented on May 1, 2024

can you run tsd install

from mfe-starter.

ctindel avatar ctindel commented on May 1, 2024

I don't have any sort of tsd command in my path. I tried running ./node_modules/.bin/tsd install which did do something but the errors still occur.

from mfe-starter.

PatrickJS avatar PatrickJS commented on May 1, 2024

ya try ./node_modules/.bin/tsd install and npm start

from mfe-starter.

PatrickJS avatar PatrickJS commented on May 1, 2024

@ctindel sorry I found the problem. this was due to tsd publishing breaking changes as patched versions and then they tried to revert them

from mfe-starter.

ctindel avatar ctindel commented on May 1, 2024

That doesn't change anything.

I also tried doing a global install of tsd but that doesn't change anything either.

I'm also trying add in the LoggedInRouterOutlet stuff from the auth0 sample since your sample doesn't have authentication stuff yet. So I created a LoggedInOutlet.ts in the same directory as app.ts and even though they both start with this line:

/// <reference path="../typings/_custom.d.ts" />

I'm still getting this warning/error at npm start time:

WARNING in ./LoggedInOutlet.ts
(3,82): Cannot find module 'angular2/angular2'. (2307)

I feel pretty comfortable with angular2 code at the moment but all this custom typing stuff is really unclear to me what is going on behind the scenes or why any of it is needed, and it seems like every sample angular2 application out there does it totally differently.

At this point I'm just trying to get your sample to start without any warnings or errors. :)

Thanks for your help!

from mfe-starter.

PatrickJS avatar PatrickJS commented on May 1, 2024

@ctindel type in ./node_modules/.bin/tsd link

from mfe-starter.

ctindel avatar ctindel commented on May 1, 2024

OK calling that tsd link seems to have removed some warnings. Is that just something you have to do every time, or one time?

from mfe-starter.

PatrickJS avatar PatrickJS commented on May 1, 2024

just once. I updated the build process to ensure others won't run into this problem

from mfe-starter.

ctindel avatar ctindel commented on May 1, 2024

OK. I have a few more questions which I think are related. Why am I not able to do this:

import {Http, Headers} from 'angular2/http';

It gives me this error:

Error: Cannot resolve module 'angular2/http'

It seems like I need to make this ngHttp/http, but I can't figure out why?

Also, I tried adding this to my App class:

@RouteConfig([
  new Route({ path: '/',       redirectTo: '/home' }),
  new Route({ path: '/home',   as: 'home',   component: Home }),
  new Route({ path: '/login',  as: 'login',  component: Login }),
  new Route({ path: '/signup', as: 'signup', component: Signup })
])

But I get these errors:

WARNING in ./app.ts
(31,3): Supplied parameters do not match any signature of call target. (2346)

WARNING in ./app.ts
(32,3): Supplied parameters do not match any signature of call target. (2346)

WARNING in ./app.ts
(33,3): Supplied parameters do not match any signature of call target. (2346)

WARNING in ./app.ts
(34,3): Supplied parameters do not match any signature of call target. (2346)

from mfe-starter.

PatrickJS avatar PatrickJS commented on May 1, 2024

@ctindel can you update this file to latest
https://github.com/angular-class/angular2-webpack-starter/blob/master/src/typings/ng2.d.ts

from mfe-starter.

ctindel avatar ctindel commented on May 1, 2024

No, the warnings still happen.

from mfe-starter.

PatrickJS avatar PatrickJS commented on May 1, 2024

the problem is due to an error in typings that angular provided. If you update the webpack config then it will ignore that warning
https://github.com/angular-class/angular2-webpack-starter/blob/master/webpack.config.js

the angular/http problem will be available next release so at the moment we have to include a local version

from mfe-starter.

ctindel avatar ctindel commented on May 1, 2024

Is ignoring the warning really the best solution? Or are we just needing to wait for the angular team to update the typings in tsd or something?

from mfe-starter.

PatrickJS avatar PatrickJS commented on May 1, 2024

ignoring and waiting for the angular team to fix it seems to be the best solution at the moment :/

from mfe-starter.

ctindel avatar ctindel commented on May 1, 2024

OK, sounds good.

Can you do me a favor? Can you pull https://github.com/ctindel/reader and go into the www directory and run npm install && npm start?

I am getting a really bizarre NoAnnotationError "Cannot resolve all parameters for DomRenderer" error that I have no idea what is going on or even how to debug it because the stack in the javascript console doesn't tell me much of anything.

This source is basically just a fork of your app, plus I tried to start adding the LoggedInRouter stuff.

from mfe-starter.

PatrickJS avatar PatrickJS commented on May 1, 2024

@ctindel yeah that error is due to the reflect-metadata version
a753691#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R47

delete reflect-metadata in node_modules and install that version

from mfe-starter.

PatrickJS avatar PatrickJS commented on May 1, 2024

@ctindel I updated the repo to alias angular2/http and fixed the reflect-metadata issue

from mfe-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.