You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 26, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 26, 2018. It is now read-only.
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
Reacted by Delio Castillo, Dat, Gabriel Zimmermann and Michael Prentice
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
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.
@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.
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.
Reacted by Youri Ackx, ampeixoto, eKatsarski, Ruslan Kedrovski, Paul Jobson, Alex Terehov and Saivenkatesh
@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...
Reacted by Delio Castillo, Youri Ackx and J.I. Powell
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.
Reacted by Oliver Sahner, Sebastian Daniel, ShriKant Vashishtha, Marcel Hédin, Simon-Payne, Thulio Philipe, Emily Isacke, Powell, Anthony, Tami Wright, with0out and 30 more
Reacted by Simon-Payne, David Rosillo, with0out and Choz
Reacted by Dibu John, Rubyleaf-MBarton, fukkuen, Ruslan Kedrovski and Kevin Murillo Fernández
Reacted by Abhishar Jangir, Théophile Nzungize, Alexandre Phiev and Ruslan Kedrovski
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 ;)
Reacted by Michael Prentice, md-geoplus, Tami Wright, Ali Niknafs, Jonathan Kupcho, David Mansfield, Choz, Gonçalo Silva, Ramesh, Paul Smith and 20 more
Reacted by Mohammad Hadi Mansouri and Adam Storr
Reacted by Adrien Delannoy, Jorge Gonzalez and Sudaman Shrestha
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
Activity
jangeador commentedon May 17, 2016
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 undefinededdiemonge commentedon May 19, 2016
Have you tried running npm update?
clement-escolano commentedon May 19, 2016
Yes, did it again.
Updated npm, node, yo and generator-angular to latest available version.
I ran
yo angularthennpm install grunt-karma karma karma-phantomjs-launcher karma-jasmine jasmine-core phantomjs-prebuilt --save-devthennpm update(with no output) thengruntand got the same error.eddiemonge commentedon May 19, 2016
did you change anything in the generated code before grunt or just ran it like that?
datnordstrom commentedon May 19, 2016
I am also having the same error, with a new install.
clement-escolano commentedon May 19, 2016
@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
grunton the untouched files) to add the cssmin command manually in the grunt file.Although it works by running
grunt cssmin:generatedthe error still remains when runninggrunt.dpointk commentedon May 23, 2016
Also have the same issue
jangeador commentedon May 24, 2016
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.45and grunt ran just fine.Hopefully someone who understands this better will shed light on which version of node we should be using.
clement-escolano commentedon May 24, 2016
@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...
dleangen commentedon May 25, 2016
Thanks! The solution worked for me, too.
joshuapowell commentedon Jun 21, 2016
This worked for me too ... although I'm a little frustrated by that the solution is to downgrade the version of Node.
datnordstrom commentedon Jun 21, 2016
Is this generator still being supported? It's been so long.
peterkwidjaja commentedon Jul 6, 2016
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.
kumarneb commentedon Jul 6, 2016
Thanks @peterkwidjaja ! That fixed it without downgrading node. Hope that change is merged in soon.
Reedyseth commentedon Jul 20, 2016
Cool, @peterkwidjaja advice also made it work for me on my node version
v6.2.2, thanks for the note.fractefactos commentedon Sep 14, 2016
Thanks for this!, the update has fixed it
thiagohmoreira commentedon Sep 19, 2016
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 ;)
antpowell commentedon Oct 9, 2016
THANKS @peterblazejewicz after hours of reading and trying to find a fix that worked.
fix(deps): update grunt-contrib-cssmin to 1.0.2
fix(deps): update grunt-contrib-cssmin to 1.0.2 (#1371)
nouhouari commentedon Jan 13, 2017
Update the package.json works for me too
"grunt-contrib-cssmin": "^1.0.0",
abhisharkjangir commentedon Jan 14, 2017
@peterkwidjaja thnks for the solution
applying fix to generator-angular issue 1320
Dagim12 commentedon Apr 4, 2017
@peterkwidjaja Thanks. Modifying node_modules/grunt-contrib-cssmin/tasks/cssmin.js as shown in the link worked for.
adminlr commentedon Aug 23, 2017
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