jaidetree / cljs-tui-template

A leiningen template to generate ClojureScript Terminal-User-Interface applications built on web technologies you already know.
Apache License 2.0
230 stars 9 forks source link

Error on npm run init #9

Closed lucasemmoreira closed 5 years ago

lucasemmoreira commented 5 years ago

Hello!

I am a Clojure/ClojureScript beginner, so I may have done something wrong.

I tried to follow instructions on Quick Start and on the step to run

npm run init

I got the following error. Could you help?

Thx!!

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'init' ] 2 info using npm@3.5.2 3 info using node@v8.10.0 4 verbose run-script [ 'preinit', 'init', 'postinit' ] 5 info lifecycle my-test-project@0.1.0~preinit: my-test-project@0.1.0 6 silly lifecycle my-test-project@0.1.0~preinit: no script for preinit, continuing 7 info lifecycle my-test-project@0.1.0~init: my-test-project@0.1.0 8 verbose lifecycle my-test-project@0.1.0~init: unsafe-perm in lifecycle true 9 verbose lifecycle my-test-project@0.1.0~init: PATH: /usr/share/npm/bin/node-gyp-bin:/home/clojure/my-test-project/node_modules/.bin:/home/lucas/Postman:/home/lucas/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 10 verbose lifecycle my-test-project@0.1.0~init: CWD: /home/lucas/clojure/my-test-project 11 silly lifecycle my-test-project@0.1.0~init: Args: [ '-c', 'npm install && npx shadow-cljs watch app' ] 12 info lifecycle my-test-project@0.1.0~init: Failed to exec init script 13 verbose stack Error: my-test-project@0.1.0 init: npm install && npx shadow-cljs watch app 13 verbose stack spawn ENOENT 13 verbose stack at ChildProcess. (/usr/share/npm/lib/utils/spawn.js:17:16) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at ChildProcess.emit (events.js:214:7) 13 verbose stack at maybeClose (internal/child_process.js:925:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 14 verbose pkgid my-test-project@0.1.0 15 verbose cwd /home/lucas/AOC/clojure/my-test-project 16 error Linux 4.15.0-66-generic 17 error argv "/usr/bin/node" "/usr/bin/npm" "run" "init" 18 error node v8.10.0 19 error npm v3.5.2 20 error file sh 21 error code ELIFECYCLE 22 error errno ENOENT 23 error syscall spawn 24 error my-test-project@0.1.0 init: npm install && npx shadow-cljs watch app 24 error spawn ENOENT 25 error Failed at the my-test-project@0.1.0 init script 'npm install && npx shadow-cljs watch app'. 25 error Make sure you have the latest version of node.js and npm installed. 25 error If you do, this is most likely a problem with the my-test-project package, 25 error not with npm itself. 25 error Tell the author that this fails on your system: 25 error npm install && npx shadow-cljs watch app 25 error You can get information on how to open an issue for this project with: 25 error npm bugs my-test-project 25 error Or if that isn't available, you can get their info via: 25 error npm owner ls my-test-project 25 error There is likely additional logging output above. 26 verbose exit [ 1, true ]

jaidetree commented 5 years ago

Hello there, I'm sorry you're having trouble running this template. Looking at your error dump it displays node v8.10.0 and npm 3.5.2. That is a significantly older version of node and npm which predates the npx tool which can run CLIs locally without a global install. I recommend you upgrade node and npm to the latest stable release.

https://nodejs.org/en/ To download the latest stable (LTS) release for your platform.

If you have projects that rely on that version of node and npm then you may want to consider a version manager to maintain multiple versions of node. https://github.com/nvm-sh/nvm

Please let me know if you have any further questions. :smile:

lucasemmoreira commented 5 years ago

Thank you very much!! It worked! I had no idea I had such an old node version... I updated and it worked!