Skip to content

Cannot find module 'babel-polyfill' #158

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

Closed
chanep opened this issue Nov 15, 2016 · 16 comments
Closed

Cannot find module 'babel-polyfill' #158

chanep opened this issue Nov 15, 2016 · 16 comments

Comments

@chanep
Copy link

chanep commented Nov 15, 2016

Version 1.1.0-M03 crashes because missing module

@keyvan-m-sadeghi
Copy link

keyvan-m-sadeghi commented Nov 16, 2016

I'm having the same issue:
https://travis-ci.org/satratech/koa-neo4j/jobs/176295919

It's introduced in 56c7995, line 33 of result.js. Code uses babel-polyfill without having it in package dependencies.

I'll submit a PR that adds this as a dependency, though neo4j team might want to consider using babel-runtime and a bundler like webpack instead if they're moving the codebase to ES6 as using polyfill in production is not a good practice.

keyvan-m-sadeghi added a commit to keyvan-m-sadeghi/neo4j-javascript-driver that referenced this issue Nov 16, 2016
@technige
Copy link
Contributor

@keyvan-m-sadeghi can you sign our CLA please, so that we can merge your fix?
https://neo4j.com/developer/cla/

@keyvan-m-sadeghi
Copy link

@nigelsmall done.

@zhenlineo
Copy link
Contributor

@keyvan-m-sadeghi Hello, we would like to explore a bit to see if we could get a better fix. So your PR is on-hold now. But thank again for issuing the PR.

For now I guess to use this driver milestone, a global dependency of babel-polyfill in your app is required to avoid this missing dependency in the driver. Sorry for bring this troublesome. We will come back soon with a fix.

@keyvan-m-sadeghi
Copy link

Sure @zhenlineo, as I said, it's just a temporary fix. One path to investigate is babel-runtime. Here's an article on the subject:
http://krasimirtsonev.com/blog/article/javascript-library-starter-using-webpack-es6
The article dates back to webpack 1, since then webpack 2 has become production ready which introduces many nice features such as 'tree shaking'.

@chanep
Copy link
Author

chanep commented Nov 19, 2016

I think we have a critical bug here. A dependency that is included as a devDependency and that is exactly what the PR solves. When you have a big app and you can't even run it because of such a rookie bug, it gives you the feeling neo4j is a low quality and improvised project.
I would merge the PR and then take all the necessary time to think a better approach.

@lutovich
Copy link
Contributor

Hello,

We've made a fix here #162. It introduces babel-runtime dependency and removes babel-polyfill dev dependency. Integration test is added as well to prevent dependency problems in future.

Feedback is very welcome!

@keyvan-m-sadeghi
Copy link

keyvan-m-sadeghi commented Nov 26, 2016

@zhenlineo have you published this as a new milestone to npm? Guess not:
https://travis-ci.org/satratech/koa-neo4j/jobs/179024725#L597

You closed, but the issue is still there.

@devniel
Copy link

devniel commented Dec 3, 2016

Hello,

I have just gotten this issue with the latest version on npm.

Thanks.

@gilbert
Copy link

gilbert commented Dec 6, 2016

I also ran into this problem today. I had to revert to 1.0.4 to get it working on node.

@WesTyler
Copy link

WesTyler commented Dec 9, 2016

Yep, still getting this here too.

@dariuszp
Copy link

Still having this problem. Guys, it's a rookie mistake. You should prepare environment with automatic testing that will install dependencies every time. I'm quite sure dev responsible for this had a global package and didn't even notice :P

@ivan-work
Copy link

Still getting when autotesting through gulp.watch + mocha. Went to node-modules and wiped every trace of babel-polyfill, then it worked, please fix =/

@lutovich
Copy link
Contributor

Hello,

We are really sorry for this error and all the inconvenience!
Things should be back to normal now.

We had two issues here:

  1. missing babel-polyfill dependency which was fixed here Use babel-runtime instead of babel-polyfill #162. PR also includes an integration test to make sure we have no such problems in future
  2. all releases (including pre-release milestones) were published to npm with latest tag. This means that each milestone would override whatever latest release is there even when it is a stable one. Fix is here Publish pre-released versions with 'next' dist-tag #170 and with it we'll publish pre-release versions with next tag. So simple npm install neo4j-driver will install latest stable version and npm install neo4j-driver@next will install latest pre-release version.

New 1.0.5 driver version was released and it is now latest on npm.

Thanks a lot for your patience and sorry once again :)

@dariuszp
Copy link

Thanks! Would be nice if You could integrate Travis Ci. Things like that could be easily avoided this way. As far as I know they are free to OS projects and support Neo4j db.

@lutovich
Copy link
Contributor

@dariuszp you mean introduce Travis CI to run tests on PRs and other background builds, right?
We already have TeamCity for this and run tests on PRs and different operating systems. Problem is that we did not have the needed test :)

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

No branches or pull requests

10 participants