简体   繁体   中英

csslint command not executing in Jenkins

I am trying to execute following command from Jenkins window batch command

csslint --format=lint-xml file.css > result.xml 

but every time it fail and give error: "csslint is not recognized as an internal or external command, operable program or batch file."

I have set the Nodejs path correctly and above command executing from command prompt successfully.

Can anybody help me on this?

First did you install csslint as a global?

npm install csslint -g

Second, I would then assume that csslint is not on your path.

in your batch program add this line above your app and see what your environment looks like.

env
csslint --format=lint-xml file.css > result.xml 

that will print out your environment variables for that given jenkins run so you can take a look at your PATH variable and see if csslint is in any of those folders.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM