Skip to content
This repository has been archived by the owner on Aug 2, 2018. It is now read-only.

file such as example.js.js won't load #420

Open
lancejpollard opened this issue Jan 6, 2015 · 1 comment
Open

file such as example.js.js won't load #420

lancejpollard opened this issue Jan 6, 2015 · 1 comment

Comments

@lancejpollard
Copy link
Member

If you have a file named:

example.js.js

And you try to require it with this:

var exampleJS = require('./example.js');

It will error on download:

    installed : [email protected]
        error : Error: Command failed: /bin/sh -c git ls-remote --tags --heads https://<token>@github.com/libraries/analytics.js
remote: Repository not found.
fatal: repository 'https://<token>@github.com/libraries/analytics.js/' not found

    at error (/Users/lancejpollard/hacks/h96/node_modules/duo/node_modules/duo-package/node_modules/gh-resolve/index.js:177:10)
    at /Users/lancejpollard/hacks/h96/node_modules/duo/node_modules/duo-package/node_modules/gh-resolve/index.js:69:37
    at ChildProcess.exithandler (child_process.js:736:5)
    at ChildProcess.EventEmitter.emit (events.js:110:17)
    at maybeClose (child_process.js:992:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1059:5)

We have had functionality like this for a long time, such as when requiring syntax highlighters for different languages. For example, we happened to have files called:

analytics-ruby.js
analytics.js.js
analytics.NET.js
...

So a workaround is to just rename to:

analytics-NET.js
analytics-javascript.js
...

but wanted to point out anyways.

@dominicbarnes
Copy link
Contributor

I'm looking into this right now, but I have noticed that if you use the (albeit uglify) ./example.js.js, then it does work as expected.

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