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

查看:119
本文介绍了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;

出现如上所述的错误.但我在"node_modules"中添加了"npm install --save auth0-js"

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天全站免登陆