assemble / grunt-assemble-permalinks

Permalinks middleware for Assemble, the static site generator for Grunt.js and Yeoman. This plugin enables powerful and configurable URI replacement patterns, presets, uses Moment.js for parsing dates, and much more.
MIT License
43 stars 11 forks source link

Peer assemble-contrib-permalinks@0.3.6 wants assemble@~0.4.12 #66

Closed loup-brun closed 8 years ago

loup-brun commented 8 years ago

Hi,

I was installing assemble for a new project today, but got the following error from npm:

1045 error Darwin 15.4.0
1046 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save-dev" "assemble-contrib-permalinks"
1047 error node v4.4.3
1048 error npm  v2.15.1
1049 error code EPEERINVALID
1050 error peerinvalid The package assemble@0.11.0 does not satisfy its siblings' peerDependencies requirements!
1050 error peerinvalid Peer assemble-contrib-permalinks@0.3.6 wants assemble@~0.4.12
1051 verbose exit [ 1, true ]

Could you update the permalinks plugin to be up-to-date with assemble?

Thanks!

assemblebot commented 8 years ago

@loup-brun Thanks for the issue! If you're reporting a bug, please be sure to include:

doowb commented 8 years ago

assemble-contrib-permalinks has been deprecated and renamed to grunt-assemble-permalinks. You should use that if you're using grunt-assemble.

BTW... if it's for this project, you should update to grunt-assemble instead of assemble and filter out grunt-assemble-* modules in load-grunt-tasks so they aren't loaded into grunt.

loup-brun commented 8 years ago

Oh, my fault! Wrong package...

In fact, it's for a different project (the one you pointed out works right now), but I will make sure to follow your advice ;) In fact, what do you mean by filtering out grunt-assemble-* modules?

Thanks!

doowb commented 8 years ago

By default load-grunt-tasks will attempt to load the tasks from any module starting with grunt-, so you'll need to exclude grunt-assemble-*.

require('load-grunt-tasks')(grunt, { pattern: ['grunt-*', '!grunt-assemble-*'] });
loup-brun commented 8 years ago

Why exclude ´grunt-assemble´? I'm missing something here...

doowb commented 8 years ago

It's a pattern: grunt-assemble-*. Notice the dash star at the end. You can just exclude this plugin explicitly: '!grunt-assemble-permalinks'.

This plugin is not a grunt plugin and there are no tasks, so if load-grunt-tasks finds it (because it's name matches the pattern grunt-*), it'll attempt to register it with grunt.loadNpmTasks('grunt-assemble-permalinks') and you'll get an error from grunt.

loup-brun commented 8 years ago

Ooh right, sorry — I misread and thought grunt-assemble should not be loaded as a grunt task (which made little sense to me). But the plugins are not grunt tasks, so they should be excluded. Got it!