-
Notifications
You must be signed in to change notification settings - Fork 960
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
can't fork and use this npm module via git in package.json #52
Comments
This has honestly been really frustrating for me too. Let me explain how things are currently setup, and hopefully we can figure out a better way to do things. Our build isn't really that strange–it's just a single babel transpile step, which is quite common nowadays, especially in the React community. We use npm's The problem in this case is that, although npm runs Perhaps @othiym23 has an idea how we can improve this... |
I guess we could use a |
Either that or we could check our |
Note even with cc @ianobermiller who knows why it's done this way. |
@gaearon Ya, that's exactly what I was thinking. Basically, if the |
Wow. Thanks for the quick turnaround on this, guys. Not sure if that commit fixed it (I haven't tried it), but I'll give it a try and let you know. |
@jeffreywescott Nah, that commit doesn't actually fix the problem because the In short, we could fix remote installs but it would mean that we now have to include the ES2015 source (the |
I started doing this, and I think it's the way to go. Some people want to look into uncompiled code, or even use ESnext env. And it handles this use case too. Go for it! |
Hey, guys. I just tried this again today, and things are still not working. I thought the reason why was that package.tgz does not include the $ npm install
/
> [email protected] postinstall /Users/jeffrey/dev/wisdomlabs/wisdomlabs-com/node_modules/history
> node -e "require('fs').stat('lib', function (e, s) { process.exit(e || !s.isDirectory() ? 1 : 0) })" || npm run build
> [email protected] build /Users/jeffrey/dev/wisdomlabs/wisdomlabs-com/node_modules/history
> babel ./modules -d lib --ignore '__tests__'
modules/Actions.js -> lib/Actions.js
modules/AsyncUtils.js -> lib/AsyncUtils.js
modules/DOMStateStorage.js -> lib/DOMStateStorage.js
modules/DOMUtils.js -> lib/DOMUtils.js
modules/ExecutionEnvironment.js -> lib/ExecutionEnvironment.js
modules/createBrowserHistory.js -> lib/createBrowserHistory.js
modules/createDOMHistory.js -> lib/createDOMHistory.js
modules/createHashHistory.js -> lib/createHashHistory.js
modules/createHistory.js -> lib/createHistory.js
modules/createLocation.js -> lib/createLocation.js
modules/createMemoryHistory.js -> lib/createMemoryHistory.js
modules/enableBeforeUnload.js -> lib/enableBeforeUnload.js
modules/enableQueries.js -> lib/enableQueries.js
SyntaxError: modules/index.js: Unexpected token (1:7)
> 1 | export createHistory from './createBrowserHistory'
| ^
2 | export createHashHistory from './createHashHistory'
3 | export createMemoryHistory from './createMemoryHistory'
4 | export createLocation from './createLocation'
npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/jeffrey/.nvm/versions/io.js/v2.4.0/bin/iojs" "/Users/jeffrey/.nvm/versions/io.js/v2.4.0/bin/npm" "run" "build"
npm ERR! node v2.4.0
npm ERR! npm v2.13.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `babel ./modules -d lib --ignore '__tests__'`
npm ERR! Exit status 1 However, even adding Any ideas? |
AFAICT you need to use |
I just confirmed that with |
I just submitted a pull request (see #51) to fix the fact that this library strips window.location.hash from the url (which breaks in-page offset navigation when using react-router. Ordinarily, when I find a problem with a library and make a fix, I can just point to my github version of the library and the branch name in my
package.json
and I'm good to go. But because of the strange build system this library uses, this is not possible, forcing everyone to wait for a new release from the primary author.Unless I'm missing something (which is entirely possible) ...
The text was updated successfully, but these errors were encountered: