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

Relative file paths in package.json are treated as github URLs #20

Open
larf311 opened this issue Apr 21, 2015 · 2 comments
Open

Relative file paths in package.json are treated as github URLs #20

larf311 opened this issue Apr 21, 2015 · 2 comments

Comments

@larf311
Copy link

larf311 commented Apr 21, 2015

Using node 0.12.0.

When you have a dependency list like the following:

"dependencies": {
  "mymodule": "./node_modules/mymodule",
  "jquery": "~1.11.1",
},

You get an error like this:

Error during fetch: Error fetching git://github.com/./node_modules/mymodule from git: Error executing git clone: Error: spawn git ENOENT

Have also tried with the following:

"dependencies": {
  "mymodule": "file:./node_modules/mymodule",
  "jquery": "~1.11.1",
},
@ktosiek
Copy link

ktosiek commented Jun 23, 2015

It seems only git+* and http/https protocols are currently supported. npm does actually handle file: paths, so it should be possible to implement. Are there any problems I'm missing?

@ktosiek
Copy link

ktosiek commented Jun 23, 2015

turns out I was missing something: PackageFetcher.fetch doesn't know where a dependency came from, so it can't resolve relative paths.

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

2 participants