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

Error: Grunt attempted to load a .coffee file but CoffeeScript was not installed. #1725

Closed
derrickb opened this issue Mar 25, 2021 · 6 comments

Comments

@derrickb
Copy link

I've just come back to my project on a fresh Windows install after some months away from it. I've been using grunt with a Gruntfile.js for years without this issue.

I installed grunt-cli 1.4.0 and get this error when attempting to run grunt in my project:

Loading "main.coffee" tasks...ERROR
    >> Error: Grunt attempted to load a .coffee file but CoffeeScript was not installed.
    >> Please run `npm install --dev coffeescript` to enable loading CoffeeScript.

I'm not using any CoffeeScript files, and do not want to add it as a dependency just to clear this error. I get the error for almost every task in my grunt file.

I tried running npm i -f as I saw that referenced elsewhere from a google search. I also updated local grunt to 1.3.0

vladikoff added a commit to gruntjs/grunt-cli that referenced this issue Mar 25, 2021
vladikoff added a commit to gruntjs/grunt-cli that referenced this issue Mar 25, 2021
@vladikoff
Copy link
Member

@derrickb
Copy link
Author

@vladikoff just grabbed grunt-cli@1.4.1 and still getting the error.

@vladikoff
Copy link
Member

@derrickb
Copy link
Author

@vladikoff I managed to track it down to this Grunt plugin: https://github.com/berlysia/grunt-encode-asset-base64

The error occurs no matter what grunt-cli version I use, I tried 1.0.0 through 1.4.1

This is really weird as I was using grunt & grunt-cli with this plugin for several years without this error. The plugin is 6 years old!

Is this something that can/should be fixed on the grunt side? Or is it on the plugin author to fix?

@derrickb
Copy link
Author

Ah it occurs with grunt versions 1.2.0 and later, and this behavior was called out in the change notes.

The plugin I linked uses both a js file and a coffee file... can grunt simply prioritize the js one to avoid the missing Coffee dependency issue?

@vladikoff vladikoff reopened this Mar 26, 2021
vladikoff added a commit to gruntjs/grunt-cli that referenced this issue Apr 4, 2021
vladikoff added a commit to gruntjs/grunt-cli that referenced this issue Apr 4, 2021
* 1.4.1

* Revert "Revert liftoff changes due to gruntjs/grunt#1725 (#143)"

This reverts commit e820858.
@vladikoff
Copy link
Member

vladikoff commented Apr 6, 2021

@derrickb i think migrating the plugin from coffeescript should fix it

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