alanshaw / grunt-include-replace

Grunt task to include files and replace variables. Allows for parameterised includes.
MIT License
200 stars 45 forks source link

Grunt aborting - Warning: undefined is not a function Use --force to continue #57

Closed simonwaw closed 8 years ago

simonwaw commented 9 years ago

I have the below config in my grunt file however keep getting an error:

Running "includereplace:dist" (includereplace) task Warning: undefined is not a function Use --force to continue.

Removing this task from my build works without issue.

Environment: osx 10.10.3 node v0.12.7 npm 2.14.1

Any ideas??

... includereplace: { dist: { options: { }, files: [ { src: 'src/profile/index.html', dest: 'dist/profile/index.html' }, { src: 'src/photos/index.html', dest: 'dist/photos/index.html' }, { src: 'src/admin/index.html', dest: 'dist/admin/index.html' }, { src: 'src/login/index.html', dest: 'dist/login/index.html' } ] } }, ...

alanshaw commented 9 years ago

Could you run with --stack to get the stacktrace printed?

arturkot commented 9 years ago

Hello @alanshaw @simonwaw ,

I've just had very similar error just a while ago and it's turned out that it's caused by... Another package. grunt-zip to be exact. I've got a feeling that it might be one of the dependencies of grunt-zip (grunt-retro) which is the culprit. So a package inside a package – little inception. ;)

Cheers,

Artur

arturkot commented 9 years ago

PS.

The quick fix I've used was downgrading to grunt-include-replace ^2.0.0.