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

Updating handlebars dependency to 2.0.0 #120

Closed
Nooshu opened this issue Sep 18, 2014 · 5 comments
Closed

Updating handlebars dependency to 2.0.0 #120

Nooshu opened this issue Sep 18, 2014 · 5 comments

Comments

@Nooshu
Copy link

Nooshu commented Sep 18, 2014

Hello,

Hopefully someone can help. I really need to use {{@root}} in a couple of each loops, which has been added to version 2.0.0 according to this post, but looking at the dependencies version 1.3.0 is currently being installed and used.

Is there any way to force assemble to use version 2.0.0?

I tried this method but had no luck. Any help would be greatly appreciated.

Thanks.

@doowb
Copy link
Member

doowb commented Sep 18, 2014

@Nooshu I was able to get the npm shrinkwrap --dev command to work, but there are a few things you need to do first:

  • delete handlebars from node_modules/assemble/node_modules/assemble-handlebars/node_modules/
  • update handlebars version to ~2.0.0 in package.json in handlebars-helpers: node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars-helpers/package.json
  • update handlebars version to ~2..0.0 in package.json in assemble-handlebars: node_modules/assemble/node_modules/assemble-handlebars/package.json
  • from the node_modules/assemble/node_modules/assemble-handlebars/ folder, run npm install handlebars@latest
  • from your project's root directory run npm shrinkwrap --dev

The last command should make the shrinkwrap file that you need. Now you can remove your node_modules folder and do npm cache clear && npm i and the dependencies will install correctly.

I tried making a simple npm-shrinkwrap.json file with just the assemble dependencies need, but it only installed those and nothing else form package.json.

Before trying this out, I was going to bump the version in assemble-handlebars, but if I do that, then we'd have to bump the minor version on assemble too and we're not ready to do that yet.

@Nooshu
Copy link
Author

Nooshu commented Sep 18, 2014

@doowb Fantastic! Thats exactly what I needed! I'm now able to log @root and see a result, so version 2.0.0 was installed perfectly.

Thanks for your quick response and help!

@Nooshu Nooshu closed this as completed Sep 18, 2014
@jfrantzius
Copy link

Hi @doowb
thanks for the workaround. Unfortunately it doesn't seem to survive an rm -rf node_modules, so one has to check in node_modules into source control (or at least node_modules/assemble/node_modules/assemble-handlebars/).

@doowb
Copy link
Member

doowb commented Apr 19, 2016

Sounds like that would be an issue with the npm shrinkwrap --dev command or npm install not respecting the shrinkwrap package.

In any case, Handlebars has been updated in grunt-assemble so if you're still using [email protected] you should start using grunt-assemble (or try out the latest assemble directly).

@jfrantzius
Copy link

Thx @doowb it seems that using grunt-assemble solves the problem, and I even managed to produce the right magical incantations in Gruntfile.js and package.json :)

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

3 participants