Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

npm - Execution error (ExceptionInfo) at cljs.closure/build (closure.clj:319 3). :bundle-cmd :none failed -- clojurescript with webpack

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
[webpack-cli] [31mRun 'webpack --help' to see available commands and options[39m
"

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?

question from:https://stackoverflow.com/questions/65672011/execution-error-exceptioninfo-at-cljs-closure-build-closure-clj319-3-bund

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Make the changes suggested by this post https://dev.to/romanliutikov/integrating-clojurescript-with-javascript-tooling-3799 and it works.

I changed :bundle-cmd to :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" } }


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...