oakmac / standard-clojure-style-js

Standard Clojure Style in JavaScript
ISC License
75 stars 1 forks source link

Does not work? #159

Closed maersdal closed 5 minutes ago

maersdal commented 14 hours ago

I'm trying to run the tool, I expect it to show issues with my code, but it just fails to run. but maybe I'm missing something. I'm not a JS expert. So prerequisites might be missing. But I expected it to just work with npx.

npx @chrisoakman/standard-clojure-style check src/


node:internal/modules/cjs/loader:1252
  throw err;
  ^

Error: Cannot find module '@npmcli/config'
Require stack:
- /usr/share/nodejs/npm/lib/utils/config/definition.js
- /usr/share/nodejs/npm/lib/utils/config/definitions.js
- /usr/share/nodejs/npm/lib/utils/config/flatten.js
- /usr/share/nodejs/npm/lib/utils/config/index.js
- /usr/share/nodejs/npm/bin/npx-cli.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15)
    at Function._load (node:internal/modules/cjs/loader:1075:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
    at Module.require (node:internal/modules/cjs/loader:1340:12)
    at require (node:internal/modules/helpers:141:16)
    at Object.<anonymous> (/usr/share/nodejs/npm/lib/utils/config/definition.js:33:5)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Object..js (node:internal/modules/cjs/loader:1689:10)
    at Module.load (node:internal/modules/cjs/loader:1318:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/share/nodejs/npm/lib/utils/config/definition.js',
    '/usr/share/nodejs/npm/lib/utils/config/definitions.js',
    '/usr/share/nodejs/npm/lib/utils/config/flatten.js',
    '/usr/share/nodejs/npm/lib/utils/config/index.js',
    '/usr/share/nodejs/npm/bin/npx-cli.js'
  ]
}
oakmac commented 13 hours ago

I am sorry you are running into issues! This does not look like an error with Standard Clojure Style to me. Maybe there is a bug with your installed version of Node.js or nvm?

maersdal commented 5 minutes ago

Thanks for the quick reply. From that message I would never have assumed that the env was the problem. Sorry for blaming you.

Reinstalled nodejs, no difference Reinstalled npm, no difference

Just to see if it was the execution or install that went wrong I tried to install the package manually.

Ran npm install @chrisoakman/standard-clojure-style npm froze... what?! Ran npm install @chrisoakman/standard-clojure-style --verbose to see what was going on, Then it did not freeze! what what?

Now it runs as expected. So I think it's safe to blame it on the npm. Safe to say that there is something stinky going on with npm (v 10.9.0 on ubuntu). Closing.