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

npm installed URIjs 1.11.1 fails to load with TypeError: Cannot read property 'IPv6' of undefined #107

Merged
merged 1 commit into from
Aug 14, 2013

Conversation

kennknowles
Copy link
Contributor

$ npm install URIjs
npm http GET https://registry.npmjs.org/URIjs
npm http 200 https://registry.npmjs.org/URIjs
npm http GET https://registry.npmjs.org/URIjs/-/URIjs-1.11.1.tgz
npm http 200 https://registry.npmjs.org/URIjs/-/URIjs-1.11.1.tgz
URIjs@1.11.1 node_modules/URIjs
$ node
> require('URIjs')
TypeError: Cannot read property 'IPv6' of undefined
    at ./node_modules/URIjs/src/IPv6.js:39:17
    at _IPv6 (./node_modules/URIjs/src/IPv6.js:19:26)
    at Object.<anonymous> (./node_modules/URIjs/src/IPv6.js:27:2)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at _URI (./submodules/solidstate.js/node_modules/URIjs/src/URI.js:18:57)

I haven't totally grokked the packaging of URIjs, or I'd attach some code.

It looks like on https://github.com/medialize/URI.js/blob/gh-pages/src/IPv6.js#L39 that root will always be undefined for node, due to https://github.com/medialize/URI.js/blob/gh-pages/src/IPv6.js#L19 calling factory with no args.

It looks like each file assumes root exists when generally it doesn't. Am I missing something?

@kennknowles kennknowles reopened this Aug 13, 2013
@kennknowles
Copy link
Contributor Author

OK good to go. This does work in node and all the tests that were passing before are still passing.

@rodneyrehm
Copy link
Member

I guess that we should "disable" (not remove) the .noConflict() methods as well?

@rodneyrehm rodneyrehm merged commit 57cd8ba into medialize:master Aug 14, 2013
@rodneyrehm
Copy link
Member

I've merged your fix into master and added your fix to URITemplate.js as well. I'll throw out another release today.

Thank you for your help!

@kennknowles kennknowles deleted the survive-undefined-root branch August 14, 2013 16:00
@kennknowles
Copy link
Contributor Author

Great! Thanks for the quick response.

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

Successfully merging this pull request may close these issues.

None yet

2 participants