安装类型需要Ionic2应用程序 [英] Install Typings require for Ionic2 application

查看:133
本文介绍了安装类型需要Ionic2应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我正在开发Ionice2项目(在这个问题上仍然很新......差不多一周),我正在尝试按照下面的教程使用PouchDB for LocalStorage。

So I am working on Ionice2 project (still new at this .. almost a week), and I am trying to follow the tutorial below to use PouchDB for LocalStorage.

教程:
http://gonehybrid.com/how-to-use-pouchdb-sqlite-for-local-storage-in-ionic-2/

一个要求是使用以下命令安装require

One of the requirements is to install require using the following command

typings install require --ambient --save

每当我尝试这个命令时,我都会收到错误

Whenever I try this command, I get the error

Unable to find "require" ("npm") in the registry. 
Did you want to try searching another source? 
Also, if you want contribute these typings, please help us: https://github.com/typings/registry

注意到我已经使用下面的命令安装了Typings,这个问题的可能原因是什么?

Noting that I already installed Typings using the command below, what are the possible causes for this issue ?

npm install typings --global


推荐答案

打字已更新最近。首先更新到最新版本的打字。

Typings has been updated recently. Update to latest version of typings first.

要安装require.d.ts文件,请使用 typings install dt~require --save --global

To install require.d.ts file use typings install dt~require --save --global

请参阅 https://github.com/typings/typings 了解更多详情

这篇关于安装类型需要Ionic2应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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