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

Node v6.9.2 error but works on earlier versions #42

Closed
ghost opened this issue Dec 9, 2016 · 4 comments
Closed

Node v6.9.2 error but works on earlier versions #42

ghost opened this issue Dec 9, 2016 · 4 comments

Comments

@ghost
Copy link

ghost commented Dec 9, 2016

Updated to node v6.9.2 and now get the following error in a yo generator that includes a Gruntfile.js

Running "dom_munger:read" (dom_munger) task

Processing index.html
Warning: Path must be a string. Received [ 'index.html' ] Use --force to continue.

I've made no changes to the Gruntfile.js and this is the config of dom_munger read object:

            read: {
                options: {
                    read: [
                        {selector: '[build-concat]', attribute: 'src', writeto: 'jsRefs', isPath:true}
                    ]
                },
                src: 'index.html'
            }, 

Any suggestions?

@ghost
Copy link
Author

ghost commented Dec 19, 2016

For info: Removing isPath:true fixed this issue

@jrgleason
Copy link

So is this the legitimate answer? Should we change path.dirname(grunt.file.expand(f)) to handle an array as well as a string?

@hagabaka
Copy link

hagabaka commented Aug 22, 2017

Pull requests #44 and #45 are both meant to fix this. As for whether removing isPath: true is a good workaround, the README says this option "is usually necessary when passing the values to another grunt task like concat or uglify", but I haven't verified it.

@niemyjski
Copy link
Collaborator

We've fixed this in 4.0 :)

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