Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in building angular2-adal #8

Open
liushuping opened this issue Jul 9, 2016 · 13 comments
Open

error in building angular2-adal #8

liushuping opened this issue Jul 9, 2016 · 13 comments

Comments

@liushuping
Copy link

liushuping commented Jul 9, 2016

I cloned the whole repo, and had run the commands

npm install
gulp

but get below errors:

src/services/adal.service.ts(4,26): error TS2307: Cannot find module 'adal'.
src/services/adal.service.ts(10,26): error TS2503: Cannot find namespace 'adal'.
src/services/adal.service.ts(18,32): error TS2503: Cannot find namespace 'adal'.
src/services/adal.service.ts(40,26): error TS2503: Cannot find namespace 'adal'.
src/services/adal.service.ts(89,34): error TS2503: Cannot find namespace 'adal'.
src/services/adal.service.ts(90,58): error TS2503: Cannot find namespace 'adal'.
src/services/adal.service.ts(91,69): error TS2503: Cannot find namespace 'adal'.
@jvanderbiest
Copy link

Same issue here doing a clean install on a windows box.

@negberts
Copy link

I fixed it by adding "adal": "github:DefinitelyTyped/DefinitelyTyped/adal-angular/adal.d.ts#53347571e6f44ed9a961b569bb81893fde4789c1" to typings.json

@liushuping
Copy link
Author

@negberts , could you please submit a pull request of your fix to help us?

@jvanderbiest
Copy link

@negberts
Strange, I tried that before but then I encountered the following errors:

src\services\adal.service.ts(34,36): error TS2339: Property 'inject' does not exist on type '{ AuthenticationContext: AuthenticationContextStatic; Logging: Logging; }'.
src\services\adal.service.ts(65,62): error TS2339: Property 'REQUEST_TYPE' does
not exist on type 'AuthenticationContext'.
src\services\adal.service.ts(67,69): error TS2339: Property 'REQUEST_TYPE' does
not exist on type 'AuthenticationContext'.
typings\index.d.ts(1,1): error TS6053: File 'c:/repos/adal/angular_pull/angular2
-adal/typings/globals/adal-angular/index.d.ts' not found.

@negberts
Copy link

negberts commented Jul 11, 2016

Well, this fix did it for me in the example... (https://github.com/alenny/angular2-adal-example) As I try it in this solution I get the errors

src\services\adal.service.ts(34,36): error TS2339: Property 'inject' does not exist on type '{ AuthenticationContext: AuthenticationContextStatic; Logging: Logging; }'.
src\services\adal.service.ts(65,62): error TS2339: Property 'REQUEST_TYPE' does not exist on type 'AuthenticationContext'.
src\services\adal.service.ts(67,69): error TS2339: Property 'REQUEST_TYPE' does not exist on type 'AuthenticationContext'.

Which seem correct because they don't exist on the interface at https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/adal-angular/adal.d.ts

Maybe a systemjs.config should be added like in the example? (I am also still figuring out how to do this whole Angular2 thing :))

@negberts
Copy link

Well, I am not allowed to publish my feature branch, but the error can be fixed by adding your own adal\index.d.ts to the src branch. I took the index.d.ts from the angular2-adal-example node_modules\angular2-adal\typings\adal path

index.d.txt

@jvanderbiest
Copy link

no worries, I already created a pull request over there... alenny/angular2-adal-example#3

@liushuping
Copy link
Author

@jvanderbiest why in example repo rather than this source repo?

@negberts
Copy link

@liushuping well, we want the example to work as well don't we? :)

This source repo can be fixed by adding the file from my previous comment, but as I mentioned, authorization prohibites me from creating a pull request in this repo

@corfor
Copy link

corfor commented Jul 21, 2016

If you use Typings:
typings install -GD github:DefinitelyTyped/DefinitelyTyped/adal-angular/adal.d.ts#53347571e6f44ed9a961b569bb81893fde4789c1

@galvanu
Copy link

galvanu commented Nov 15, 2016

I have the same issue while trying to integrate it in angular-cli project. do you have solution for this scenario where typings is not part of the project and instead using @type of npm?

@MikeLallemont
Copy link

I am having the same issue while trying to use @types/adal. It is only an issue on a Window machine though, my Mac works fine. Anybody got ideas?

@galvanu
Copy link

galvanu commented Nov 17, 2016

Do you have typings installed globally both on the windows and mac machines?

And I'm getting the following issue:

ERROR in .//ng2-adal/services/adal.service.js
Module not found: Error: Can't resolve 'adal' in '/Users/user/Workspace/project/node_modules/ng2-adal/services'
@ ./
/ng2-adal/services/adal.service.js 21:14-29
@ .//ng2-adal/services.js
@ ./
/ng2-adal/core.js
@ ./src/app/app.module.ts
@ ./src/app/index.ts
@ ./src/main.ts
@ multi main

Do you have any idea how can I solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants