Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with 04 Install A Module #29

Open
seppevs opened this issue Jun 26, 2015 · 3 comments
Open

Issue with 04 Install A Module #29

seppevs opened this issue Jun 26, 2015 · 3 comments

Comments

@seppevs
Copy link

seppevs commented Jun 26, 2015

This exercise does not work for me. I get a 404 when it's attempted to fetch the 'pkg' module from the NPM registry:

$ npm install @linclark/pkg
npm WARN package.json @seb/how-to-npm@1.0.0 No description
npm WARN package.json @seb/how-to-npm@1.0.0 No repository field.
npm WARN package.json @seb/how-to-npm@1.0.0 No README data
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "@linclark/pkg"
npm ERR! node v0.12.1
npm ERR! npm  v2.12.0
npm ERR! code E404

npm ERR! 404 missing : @linclark/pkg
npm ERR! 404
npm ERR! 404 '@linclark/pkg' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of '@seb/how-to-npm'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/seb/Work/Training/nodejs/nodeschool/core/how-to-npm/npm-debug.log

Here is the content of npm-debug.log:

$ cat npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install', '@linclark/pkg' ]
2 info using npm@2.12.0
3 info using node@v0.12.1
4 verbose node symlink /usr/local/bin/node
5 verbose install initial load of /Users/seb/Work/Training/nodejs/nodeschool/core/how-to-npm/package.json
6 warn package.json @seb/how-to-npm@1.0.0 No description
7 warn package.json @seb/how-to-npm@1.0.0 No repository field.
8 warn package.json @seb/how-to-npm@1.0.0 No README data
9 verbose readDependencies loading dependencies from /Users/seb/Work/Training/nodejs/nodeschool/core/how-to-npm/package.json
10 silly cache add args [ '@linclark/pkg', null ]
11 verbose cache add spec @linclark/pkg
12 silly cache add parsed spec { raw: '@linclark/pkg',
12 silly cache add   scope: '@linclark',
12 silly cache add   name: '@linclark/pkg',
12 silly cache add   rawSpec: '',
12 silly cache add   spec: '*',
12 silly cache add   type: 'range' }
13 silly addNamed @linclark/pkg@*
14 verbose addNamed "*" is a valid semver range for @linclark/pkg
15 silly addNameRange { name: '@linclark/pkg', range: '*', hasData: false }
16 silly mapToRegistry name @linclark/pkg
17 silly mapToRegistry scope (from package name) @linclark
18 verbose mapToRegistry no registry URL found in name for scope @linclark
19 silly mapToRegistry using default registry
20 silly mapToRegistry registry http://localhost:15443/
21 silly mapToRegistry uri http://localhost:15443/@linclark%2fpkg
22 verbose addNameRange registry:http://localhost:15443/@linclark%2fpkg not in flight; fetching
23 verbose request uri http://localhost:15443/@linclark%2fpkg
24 verbose request no auth needed
25 info attempt registry request try #1 at 15:27:13
26 verbose request id dbe68dc9739d7d4b
27 http request GET http://localhost:15443/@linclark%2fpkg
28 http 404 http://localhost:15443/@linclark%2fpkg
29 verbose headers { 'content-type': 'application/json',
29 verbose headers   date: 'Fri, 26 Jun 2015 13:27:13 GMT',
29 verbose headers   connection: 'keep-alive',
29 verbose headers   'transfer-encoding': 'chunked' }
30 silly get cb [ 404,
30 silly get   { 'content-type': 'application/json',
30 silly get     date: 'Fri, 26 Jun 2015 13:27:13 GMT',
30 silly get     connection: 'keep-alive',
30 silly get     'transfer-encoding': 'chunked' } ]
31 verbose stack Error: missing : @linclark/pkg
31 verbose stack     at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:247:14)
31 verbose stack     at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:170:14)
31 verbose stack     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:197:22)
31 verbose stack     at Request.emit (events.js:110:17)
31 verbose stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1050:14)
31 verbose stack     at Request.emit (events.js:129:20)
31 verbose stack     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:996:12)
31 verbose stack     at IncomingMessage.emit (events.js:129:20)
31 verbose stack     at _stream_readable.js:908:16
31 verbose stack     at process._tickCallback (node.js:355:11)
32 verbose statusCode 404
33 verbose pkgid @linclark/pkg
34 verbose cwd /Users/seb/Work/Training/nodejs/nodeschool/core/how-to-npm
35 error Darwin 14.3.0
36 error argv "node" "/usr/local/bin/npm" "install" "@linclark/pkg"
37 error node v0.12.1
38 error npm  v2.12.0
39 error code E404
40 error 404 missing : @linclark/pkg
40 error 404
40 error 404 '@linclark/pkg' is not in the npm registry.
40 error 404 You should bug the author to publish it (or use the name yourself!)
40 error 404 It was specified as a dependency of '@seb/how-to-npm'
40 error 404
40 error 404 Note that you can also install from a
40 error 404 tarball, folder, http url, or git url.
41 verbose exit [ 1, true ]
@mgruesbeck
Copy link

For anyone else doing this lesson and wondering ... this is still broken.

@svenhendrikx
Copy link

For anyone still trying to figure this out, you can see your registry with npm config list, the registry should be set to https://registry.npmjs.org/. You can edit this using npm config set registry https://registry.npmjs.org/ but that didn't work for me, so I edited the config file manually. You can find the path of this config file with npm config list too.

@watilde
Copy link
Member

watilde commented Sep 28, 2017

Hmm. The thing is when users run the step 01, it makes .npmrc at the project root.

https://github.com/workshopper/how-to-npm/blob/master/problems/01-dev-environment/index.js

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

No branches or pull requests

5 participants