I'm trying to run the official example https://clojurescript.org/guides/webpack on windows and I get the following error when I execute it:
Execution error (ExceptionInfo) at cljs.closure/run-bundle-cmd (closure.clj:3037).
:bundle-cmd :none failed
I the full report says the following:
"[webpack-cli] [31mUnknown command 'out/index.js'[39m\n[webpack-cli] [31mRun 'webpack --help' to see available commands and options[39m\n"
I tried changing the suggested "npx" and "webpack" commands with:
"npx.cmd"
and with the possibles absolute paths:
"C:/Users/usuario/AppData/Roaming/npm/npx.cmd"
and
"C:/Program Files/nodejs/npx.cmd"
...the same for "webpack"
Also tried changing 'out/index.js' to './out/index.js' and using {:deps {org.clojure/clojurescript {:mvn/version "1.10.773"}}} version instead of 1.10.741 suggested in the tutorial.
Any idea for what is going on?
Make the changes suggested by this post https://dev.to/romanliutikov/integrating-clojurescript-with-javascript-tooling-3799 and it works.
I changed
:bundle-cmdto:none ["C:/Program Files/nodejs/npx.cmd" "C:/Users/usuario/AppData/Roaming/npm/webpack.cmd" "--mode=development"]and add the following webpack.config.js
module.exports = { entry: "./out/index.js", output: { path: __dirname, filename: "bundle.js" } }