I need to run the following commands:
bower update
grunt build
I am getting the following error:
C:\Program Files (x86)\Jenkins\jobs\Build\workspace>export PHANTOMJS_BIN=/usr/lib/node_modules/phantomjs
'export' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\Jenkins\jobs\Build\workspace>export XDG_CONFIG_HOME="$WORKSPACE/.config"
'export' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\Jenkins\jobs\Build\workspace>bower update
'bower' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\Jenkins\jobs\Build\workspace>grunt build
'grunt' is not recognized as an internal or external command,
operable program or batch file.
Please suggest
export command is not for Windows; it's for *nix machines. If you want to set some path on Windows OS, use set command. Remember that this value will be set only for the current shell. Once you close the command prompt, the value will also get unset.
For example,
set PHANTOMJS_BIN=/usr/lib/node_modules/phantomjs
set XDG_CONFIG_HOME="$WORKSPACE/.config"
For the third and fourth error, you have to make sure that bower (and grunt) command is in the PATH otherwise the system will never be able to locate the command as is happening right now. To make it work, just add the path to bower executable in PATH variable.
set PATH=%PATH%;path_to_bower_executable
For example, if bower command is in c:\bower\bin, just add
set PATH=%PATH%;C:\bower\bin
To set your changes permanently, you can go through the steps mentioned in this link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With