Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

unable to find require #533

Closed
kingleroyg opened this issue May 20, 2016 · 9 comments
Closed

unable to find require #533

kingleroyg opened this issue May 20, 2016 · 9 comments

Comments

@kingleroyg
Copy link

Description

When I enter the following command
typings install require --ambient --save
or
typings install require --global --save
I keep on getting the following error:

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 C:\wamp\www\ionic2-tutorial-pouchdb
typings ERR! system Windows_NT 10.0.10586
typings ERR! command "C:\\Program Files\\nodejs\\node.exe" "<hiddin>\\AppData\\Roaming\\npm\\node_modules\\typings\\dist\\bin.js" "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>

I also did a search too see if require exists and yes it does
require dt http://requirejs.org/ 1 2016-03-16T15:55:26.000Z

Versions

Current version 1.0.4

@demurgos
Copy link

demurgos commented May 20, 2016

Hi,
The search result reads as:

name    | source | home                  | version | last update
require | dt     | http://requirejs.org/ | 1       | 2016-03-16T15:55:26.000Z

Since v1 you are required to explicitly specify the source for globals by prefixing the name by source~. So you need:

typings install -SG dt~require

@unional
Copy link
Member

unional commented May 20, 2016

For --global, you need to explicitly specify the source

@unional
Copy link
Member

unional commented May 20, 2016

Or typings install env~require -SG

@unional
Copy link
Member

unional commented May 20, 2016

@demurgos, how did you get only one search result? I got 4.

typings search require
Viewing 4 of 4

NAME                        SOURCE HOMEPAGE                                DESCRIPTION VERSIONS UPDATED
require                     dt     http://requirejs.org/                               1        2016-03-16T15:55:26.000Z
requirejs                   npm    https://www.npmjs.com/package/requirejs             1        2016-03-19T06:23:57.000Z
requirejs                   env                                                        1        2016-03-19T06:20:41.000Z
requirejs-domready/domready dt     https://github.com/requirejs/domReady               1        2016-03-16T15:55:26.000Z

@unional unional closed this as completed May 20, 2016
@demurgos
Copy link

@unional
I was just explaining the line provided by @kingleroyg. (I did not perform search myself at the moment)

(Overall, I would recommend env if present)

@kingleroyg
Copy link
Author

Thanks @unional I only showed the result I wanted which is "require"
Non of the solutions worked...
I tried typings install -SG dt~require
result:

require
└── (No dependencies)

@unional
Copy link
Member

unional commented May 20, 2016

That means it is installed.

@demurgos
Copy link

You should now have the definitions installed in typings/globals/require, what is the issue ?

@kingleroyg
Copy link
Author

Thanks your right @unional and @demurgos ..... THANKS 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants