I am trying to install a github project fork with npm (on master, and not on any specific commit, since I want to develop against it):
% npm install parkan/graffiti-mongoose
@risingstack/graffiti-mongoose@2.0.0 node_modules/@risingstack/graffiti-mongoose
This seems to be looking for the parent repo and setting it to master on my gh, as far as it is good. Note that the package uses the semantics of the semantic sample of the package , which, it seems to me, is part of the problem.
% npm list |grep mongoose
βββ @risingstack/graffiti-mongoose@2.0.0 (git://github.com/parkan/graffiti-mongoose.git
% ls node_modules/@risingstack/graffiti-mongoose
CHANGELOG.md LICENSE fixture
CONTRIBUTING.md README.md package.json
However, I cannot get node to import or require it in any obvious way:
> require('graffiti-mongoose');
Error: Cannot find module 'graffiti-mongoose'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at repl:3:1
at Object.exports.runInThisContext (vm.js:54:17)
at _eval (/usr/local/lib/node_modules/babel/lib/_babel-node.js:86:26)
at REPLServer.replEval (/usr/local/lib/node_modules/babel/lib/_babel-node.js:169:14)
at bound (domain.js:250:14)
at REPLServer.runBound [as eval] (domain.js:263:12)
> require('@risingstack/graffiti-mongoose');
Error: Cannot find module '@risingstack/graffiti-mongoose'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at repl:3:1
at Object.exports.runInThisContext (vm.js:54:17)
at _eval (/usr/local/lib/node_modules/babel/lib/_babel-node.js:86:26)
at REPLServer.replEval (/usr/local/lib/node_modules/babel/lib/_babel-node.js:169:14)
at bound (domain.js:250:14)
at REPLServer.runBound [as eval] (domain.js:263:12)
> require('risingstack/graffiti-mongoose');
Error: Cannot find module 'risingstack/graffiti-mongoose'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at repl:3:1
at Object.exports.runInThisContext (vm.js:54:17)
at _eval (/usr/local/lib/node_modules/babel/lib/_babel-node.js:86:26)
at REPLServer.replEval (/usr/local/lib/node_modules/babel/lib/_babel-node.js:169:14)
at bound (domain.js:250:14)
at REPLServer.runBound [as eval] (domain.js:263:12)
How do I get a package that is inside such a subdirectory?
source
share