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

Version issues with node and grunt #298

Closed
heylookltsme opened this issue Mar 22, 2017 · 2 comments
Closed

Version issues with node and grunt #298

heylookltsme opened this issue Mar 22, 2017 · 2 comments

Comments

@heylookltsme
Copy link
Contributor

This isn't really an issue with this project per se, but I wanted to document my experience in case it helps others.

I cloned the repo and ran npm install. I didn't have grunt already, so I installed it globally, npm install -g grunt. Then I went to run grunt dev to build the project and I get an error -

Fatal error in ../deps/v8/src/api.cc, line 1051

Boooo. So I googled and this error is documented here and here. I followed the suggestion from that first link and updated all my dependencies. Now grunt works like a charm, yay!

But I start dev'ing and I run into a bunch of issues with the development build of the extension... (you can see where this is going...). After some debugging, I realize that the problem (or one of them, anyway), is that I updated to a backwards-compatibly breaking version of lodash and scope binding was all screwed up.

At that point, I realized how foolish it was to just update all the project dependencies and expect that nothing would break. 🙃 🔫 So I wiped node_modules/ and started over. Since many of the dependency versions are quite old, I figured the problem was with the version of node that I was using (v7.2.1), so I installed nvm and version v6.9.0 and viola, problem solved! I could now use grunt.

So yeah, like I said, not a problem with this project per se, but a headache for me when I thought what I wanted to do would be super simple. Perhaps the project could include an .nvmrc to make it explicit that node 7 isn't going to work out? Either way, I hope documenting this here saves other folks some time. ❤️

@berrberr
Copy link
Owner

Thank you for the detailed write up!! This is definitely something that should be fixed -- setup should be as painless as possible. I ran npm-check-updates and ... basically every package is either old or very old 😭

 browserify                  ~3.39.0  →  ~14.1.0
 browserify-shim              ~3.7.0  →  ~3.8.13
 grunt                        ~0.4.5  →   ~1.0.1
 grunt-browserify             ~3.1.0  →   ~5.0.0
 grunt-contrib-clean          ~0.5.0  →   ~1.0.0
 grunt-contrib-compress      ~0.10.0  →   ~1.4.1
 grunt-contrib-copy           ~0.5.0  →   ~1.0.0
 grunt-contrib-jshint        ~0.12.0  →   ~1.1.0
 grunt-contrib-uglify         ~0.4.0  →   ~2.2.0
 grunt-karma                 ^0.12.1  →   ^2.0.0
 grunt-lintspaces             ~0.7.0  →   ~0.8.1
 grunt-mkdir                  ~0.1.1  →   ~1.0.0
 grunt-sass                   ^1.1.0  →   ^2.0.0
 jshint-stylish               ~0.2.0  →   ~2.2.1
 karma                      ^0.13.14  →   ^1.5.0
 karma-browserify             ^4.4.0  →   ^5.1.1
 karma-jasmine                ^0.3.6  →   ^1.1.0
 karma-phantomjs2-launcher    ^0.3.2  →   ^0.5.0
 knockout                     ~3.3.0  →   ~3.4.2
 es6-promise                  ^3.0.2  →   ^4.1.0
 lodash                      ~3.10.0  →  ~4.17.4
 sinon                       ^1.11.1  →   ^2.1.0
 sinon-chrome                 ^0.2.0  →   ^2.1.3
 chai                         ~1.9.1  →   ~3.5.0
 grunt-contrib-watch          ~0.6.1  →   ~1.0.0
 grunt-exec                   ~0.4.6  →   ~2.0.0
 karma-spec-reporter          0.0.23  →   0.0.30
 watchify                     ~2.1.0  →   ~3.9.0

I think that most of these should be pretty painless / safe to update, I'll give it a go.

@heylookltsme
Copy link
Contributor Author

Godspeed and many thanks!! :D

I'm not sure about any of the others, but I know that that lodash 4.x definitely introduces breaking changes. Maybe try updating everything but lodash first?

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

2 participants