Skip to content
This repository was archived by the owner on Mar 26, 2018. It is now read-only.
This repository was archived by the owner on Mar 26, 2018. It is now read-only.

Error when running cssmin:generated #1320

Closed

Description

@clement-escolano

Hello !

I created a new app (with yo angular) and then tried to build it with grunt. After installing the test related packages as mentioned here #1218 I encountered an other error which prevents the app from building :

Running "cssmin:generated" (cssmin) task
Warning: Path must be a string. Received undefined Use --force to continue.

I am not sure what I need to do (I am very new to grunt and yo) in order to fix the issue.

Here is my configuration :
generator-angular@0.15.1
npm@3.8.6
yo@1.8.1

Thank you !
Clement

PS : sorry if this is not a generator-angular related issue

Activity

  1. jangeador commented on May 17, 2016

    @jangeador

    I have the same problem.
    Running "cssmin:generated" (cssmin) task Warning: Path must be a string. Received undefined Use --force to continue. TypeError: Path must be a string. Received undefined

  2. eddiemonge commented on May 19, 2016

    @eddiemonge
    Member

    Have you tried running npm update?

  3. clement-escolano commented on May 19, 2016

    @clement-escolano
    Author

    Yes, did it again.
    Updated npm, node, yo and generator-angular to latest available version.
    I ran yo angular then npm install grunt-karma karma karma-phantomjs-launcher karma-jasmine jasmine-core phantomjs-prebuilt --save-dev then npm update (with no output) then grunt and got the same error.

  4. eddiemonge commented on May 19, 2016

    @eddiemonge
    Member

    did you change anything in the generated code before grunt or just ran it like that?

  5. datnordstrom commented on May 19, 2016

    @datnordstrom

    I am also having the same error, with a new install.

  6. clement-escolano commented on May 19, 2016

    @clement-escolano
    Author

    @eddiemonge
    I didn't change anything (neither the grunt file or any other file).
    The commands in my message above are the only thing I did when in a new empty directory.
    Also tried (after trying to run grunt on the untouched files) to add the cssmin command manually in the grunt file.
    Although it works by running grunt cssmin:generated the error still remains when running grunt.

  7. dpointk commented on May 23, 2016

    @dpointk

    Also have the same issue

  8. jangeador commented on May 24, 2016

    @jangeador

    Ok guys, I was finally able to run it without error. The problem for me was the node version. I was trying to run it using Node version 6.0.0. I installed a node version manager and started using v0.10.45 and grunt ran just fine.

    Hopefully someone who understands this better will shed light on which version of node we should be using.

  9. clement-escolano commented on May 24, 2016

    @clement-escolano
    Author

    @jangeador Thank you for the solution, it works indeed :)
    What is very strange though, is that when I take the files generated with the node v0.10.45 and copy them in my regular computer, it still doesn't work ! This is crazy...

  10. dleangen commented on May 25, 2016

    @dleangen

    Thanks! The solution worked for me, too.

  11. joshuapowell commented on Jun 21, 2016

    @joshuapowell

    This worked for me too ... although I'm a little frustrated by that the solution is to downgrade the version of Node.

  12. datnordstrom commented on Jun 21, 2016

    @datnordstrom

    Is this generator still being supported? It's been so long.

  13. peterkwidjaja commented on Jul 6, 2016

    @peterkwidjaja

    The error is actually on grunt-contrib-cssmin dependency.
    You can refer to Link
    Go to node_modules/grunt-contrib-cssmin/tasks/cssmin.js and change as what the link states.
    It works for me.

  14. kumarneb commented on Jul 6, 2016

    @kumarneb

    Thanks @peterkwidjaja ! That fixed it without downgrading node. Hope that change is merged in soon.

  15. Reedyseth commented on Jul 20, 2016

    @Reedyseth

    Cool, @peterkwidjaja advice also made it work for me on my node version v6.2.2, thanks for the note.

  16. fractefactos commented on Sep 14, 2016

    @fractefactos

    Thanks for this!, the update has fixed it

  17. thiagohmoreira commented on Sep 19, 2016

    @thiagohmoreira

    I fixed this to my project simply updating grunt-contrib-cssmin dependency version on package.json:

    From: "grunt-contrib-cssmin": `"^0.12.0"

    To: "grunt-contrib-cssmin": "^1.0.2"

    Probably good to have this updated on the generator too ;)

  18. antpowell commented on Oct 9, 2016

    @antpowell

    THANKS @peterblazejewicz after hours of reading and trying to find a fix that worked.

  19. added a commit that references this issue on Oct 20, 2016
    a948651
  20. added a commit that references this issue on Nov 23, 2016
    ad5bfad
  21. nouhouari commented on Jan 13, 2017

    @nouhouari

    Update the package.json works for me too

    "grunt-contrib-cssmin": "^1.0.0",

  22. abhisharkjangir commented on Jan 14, 2017

    @abhisharkjangir

    @peterkwidjaja thnks for the solution

  23. Dagim12 commented on Apr 4, 2017

    @Dagim12

    @peterkwidjaja Thanks. Modifying node_modules/grunt-contrib-cssmin/tasks/cssmin.js as shown in the link worked for.

  24. adminlr commented on Aug 23, 2017

    @adminlr

    hello i am running grunt sass command it is giving following error
    Warning: Path must be a string. Received undefined Use --force to continue.
    please help me as soon as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions