Angular 2 + Auth0(找不到模块“auth0-js"的声明文件.) [英] Angular 2 + Auth0 (Could not find a declaration file for module 'auth0-js'. )

查看:33
本文介绍了Angular 2 + Auth0(找不到模块“auth0-js"的声明文件.)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

找不到模块auth0-js"的声明文件.'C:/sandbox/loginauth0/node_modules/auth0-js/src/index.js' 隐式具有 'any' 类型.

我想使用 auth0 登录.但是在按照说明构建我自己的 Angular 2 服务之后.

I wanted to use the auth0 login. But after following the instructions and building my own Angular 2 service.

从 'auth0-js' 导入 * 作为 auth0;

给出类似上面的错误.但我将它与npm install --save auth0-js"一起放入我的 node_modules

gives an error like above. but I put it in with "npm install --save auth0-js" and its in my node_modules

推荐答案

首先,请确保关闭 tsconfig.json 中的属性 noImplicitAny.

First, be sure you turn off the property noImplicitAny in tsconfig.json.

然后,验证您是否按照此处的步骤操作:https://auth0.com/docs/quickstart/spa/angular2

Then, verify you are following the steps here: https://auth0.com/docs/quickstart/spa/angular2

这篇关于Angular 2 + Auth0(找不到模块“auth0-js"的声明文件.)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆