installing typings require failed in macOSX

六眼飞鱼酱① 提交于 2019-12-11 13:24:28

问题


I following a tutorial to 'use PouchDB for localStorage in ionic' and the author says i need run this command:

typings install require --ambient --save

i know in version 1.0 of typings, ambient changed to global but when i run this command i get an error:

sudo typings install require --global --save
typings ERR! message 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 ERR! caused by https://api.typings.org/entries/npm/require/versions/latest responded with 404, expected it to equal 200

typings ERR! cwd /Users/userName/Desktop/ionic-projects/ionic2-tutorial-pouchdb
typings ERR! system Darwin 15.4.0
typings ERR! command "/usr/local/bin/node" "/usr/local/bin/typings" "install" "require" "--global" "--save"
typings ERR! node -v v4.4.4
typings ERR! typings -v 1.0.4

typings ERR! If you need help, you may report this error at:
typings ERR!   <https://github.com/typings/typings/issues>

thanks


回答1:


I had exactly the same issue on windows. try

typings install env~requirejs --global --save

I also submitted a Issue at typings and they said I should try the following

typings install -SG dt~require

and if you get the following:

require
└── (No dependencies)

It means it has already bean installed



来源:https://stackoverflow.com/questions/37309865/installing-typings-require-failed-in-macosx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!