Ionic2 应用程序需要安装类型 [英] Install Typings require for Ionic2 application
问题描述
所以我正在研究 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/如何使用-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 最近更新了.首先更新到最新版本的类型.
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 了解更多详情
Refer https://github.com/typings/typings for further details
这篇关于Ionic2 应用程序需要安装类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!