Giter VIP home page Giter VIP logo

Comments (11)

chenkie avatar chenkie commented on May 19, 2024

Thanks for the feedback. I'd like to move it to commonjs eventually. Not sure if it will be the next release, but it will happen soon :)

from angular2-jwt.

escardin avatar escardin commented on May 19, 2024

Okay. I ended up compiling it directly in my build in the meantime. It does give me warnings about implicit anys, but I can deal with that for now.

from angular2-jwt.

bufke avatar bufke commented on May 19, 2024

@escardin could you explain your workaround in more detail?

from angular2-jwt.

escardin avatar escardin commented on May 19, 2024

I import the source instead of the package. i.e.:

import {AuthHttp,IAuthConfig,AuthConfig,tokenNotExpired} from '../../../../../node_modules/angular2-jwt/src/angular2-jwt.ts';

instead of

import {AuthHttp,IAuthConfig,AuthConfig,tokenNotExpired} from 'angular2-jwt';

from angular2-jwt.

bufke avatar bufke commented on May 19, 2024

Strange I just get

./~/angular2-jwt/src/angular2-jwt.ts
Module parse failed: /code/node_modules/angular2-jwt/src/angular2-jwt.ts Line 1: Unexpected token
You may need an appropriate loader to handle this file type.
| import {Injectable, Injector} from 'angular2/angular2';

I'm using webpack but not sure why that would make any difference. Importing other typescript files works just fine.

from angular2-jwt.

bufke avatar bufke commented on May 19, 2024

blah - copying it from node_modules elsewhere fixed it. Sorry this is a strange new world for me. Guessing webpack configuration issue..

from angular2-jwt.

escardin avatar escardin commented on May 19, 2024

I switched to webpack after filing this but still had the same problem, used the same workaround.

from angular2-jwt.

chenkie avatar chenkie commented on May 19, 2024

@escardin: can you check 0.1.3 with Webpack? The sample here has a Webpack setup.

from angular2-jwt.

escardin avatar escardin commented on May 19, 2024

I switched from my fork to your version and it worked okay. :D

from angular2-jwt.

chenkie avatar chenkie commented on May 19, 2024

awesome thanks!

from angular2-jwt.

danikenan avatar danikenan commented on May 19, 2024

I have the same problem with latest version.
Installed with webpack. Ran on windows. Switched to my mac. git cloned the same project and could not get it to work from node_module. Had to copy the 'ts' file outside of node_modules and use it directly.

from angular2-jwt.

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.