redux-devtools icon indicating copy to clipboard operation
redux-devtools copied to clipboard

Redux-devtool cli doesn't work with pnpm

Open nickbar01234 opened this issue 6 months ago • 2 comments

I installed @redux-devtools/cli as a dev-dependency via pnpm. Running the remote server gave the following error. Observed that using npm works fine -- I've only tried global installation, though, but confirming that it also breaks if using pnpm globally


> [email protected] start-redux-devtools <path-to-project>/extension
> redux-devtools --hostname=localhost --port=8001 --open

[ReduxDevTools] Start server...
--------------------------------------------------------------------------------

Knex: run
$ npm install sqlite3 --save
Could not locate the bindings file. Tried:
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/build/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/build/Debug/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/build/Release/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/out/Debug/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/Debug/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/out/Release/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/Release/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/build/default/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/compiled/22.14.0/darwin/arm64/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/addon-build/release/install-root/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/addon-build/debug/install-root/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/addon-build/default/install-root/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/lib/binding/node-v127-darwin-arm64/node_sqlite3.node
Error: Could not locate the bindings file. Tried:
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/build/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/build/Debug/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/build/Release/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/out/Debug/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/Debug/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/out/Release/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/Release/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/build/default/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/compiled/22.14.0/darwin/arm64/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/addon-build/release/install-root/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/addon-build/debug/install-root/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/addon-build/default/install-root/node_sqlite3.node
 → <path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/lib/binding/node-v127-darwin-arm64/node_sqlite3.node
    at bindings (<path-to-project>/node_modules/.pnpm/[email protected]/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (<path-to-project>/node_modules/.pnpm/[email protected]/node_modules/sqlite3/lib/sqlite3-binding.js:1:37)
    at Module._compile (node:internal/modules/cjs/loader:1554:14)
    at Object..js (node:internal/modules/cjs/loader:1706:10)
    at Module.load (node:internal/modules/cjs/loader:1289:32)
    at Function._load (node:internal/modules/cjs/loader:1108:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
    at Module.require (node:internal/modules/cjs/loader:1311:12)
    at require (node:internal/modules/helpers:136:16)

Node.js v22.14.0

nickbar01234 avatar May 29 '25 03:05 nickbar01234

Do you see any warnings like the following when you run pnpm install? You may need to run pnpm approve-builds to approve sqlite3.

╭ Warning ─────────────────────────────────────────────────────────────────────╮
│                                                                              │
│   Ignored build scripts: @apollo/protobufjs, @swc/core, chromedriver,        │
│   electron, esbuild, msw, sqlite3.                                           │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed     │
│   to run scripts.                                                            │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

Methuselah96 avatar May 31 '25 12:05 Methuselah96

Hey @Methuselah96, thanks for responding. I don't think I see any thing similar to what you mentioned.

pnpm install @redux-devtools/cli --save-dev
..                                       |  WARN  `node_modules` is present. Lockfile only installation will make it out-of-date
..                                       | Progress: resolved 1, reused 0, downloaded 0, a..                                       | Progress: resolved 67, reused 0, downloaded 0, ..                                       | Progress: resolved 180, reused 0, downloaded 0,..                                       | Progress: resolved 226, reused 0, downloaded 0,..                                       | Progress: resolved 289, reused 0, downloaded 0,..                                       | Progress: resolved 400, reused 0, downloaded 0,..                                       | Progress: resolved 619, reused 0, downloaded 0,..                                       | Progress: resolved 625, reused 0, downloaded 0,..                                       | Progress: resolved 628, reused 0, downloaded 0,..                                       | Progress: resolved 630, reused 0, downloaded 0,..                                       | Progress: resolved 632, reused 0, downloaded 0,..                                       | Progress: resolved 637, reused 0, downloaded 0,..                                       | Progress: resolved 668, reused 0, downloaded 0,..                                       | Progress: resolved 688, reused 0, downloaded 0,..                                       | Progress: resolved 814, reused 0, downloaded 0,..                                       | Progress: resolved 902, reused 0, downloaded 0,..                                       | Progress: resolved 1085, reused 0, downloaded 0..                                       | Progress: resolved 1191, reused 0, downloaded 0..                                       | Progress: resolved 1443, reused 0, downloaded 0..                                       | Progress: resolved 1596, reused 0, downloaded 0..                                       | Progress: resolved 1604, reused 0, downloaded 0..                                       | Progress: resolved 1616, reused 0, downloaded 0..                                       | Progress: resolved 1617, reused 0, downloaded 0 WARN  32 deprecated subdependencies found: @npmcli/[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
..                                       | Progress: resolved 1617, reused 0, downloaded 0..                                       | Progress: resolved 1618, reused 0, downloaded 0..                                       | Progress: resolved 1618, reused 0, downloaded 0, added 0, done
 WARN  Issues with peer dependencies found
.
└─┬ @firebase/rules-unit-testing 4.0.1
  └── ✕ unmet peer firebase@^11.0.0: found 10.14.1

extension
└─┬ @redux-devtools/remote 0.9.5
  └─┬ @redux-devtools/utils 3.1.1
    ├── ✕ unmet peer immutable@^4.3.7: found 5.1.2
    └─┬ @redux-devtools/serialize 0.4.2
      └── ✕ unmet peer immutable@^4.0.0: found 5.1.2

dependencies:
- @redux-devtools/cli ^4.0.3

devDependencies:
+ @redux-devtools/cli ^4.0.3

.. prepare$ husky
└─ Done in 238ms
Done in 5.8s using pnpm v10.6.3

nickbar01234 avatar Jun 03 '25 23:06 nickbar01234

I hit this same issue and it was the approve-builds command that caused it, but then I get NotFoundError: Not Found. Looks like this path res.sendFile(path.join(path.dirname(fileURLToPath(import.meta.url)), '../app/index.html')); is not resolving.

joprice avatar Dec 03 '25 22:12 joprice

This can be fixed by resolving using root res.sendFile('index.html', {root: path.join(path.dirname(fileURLToPath(import.meta.url)), '../app/')});, but the umd modules are not found due to https://github.com/reduxjs/redux-devtools/issues/1931.

joprice avatar Dec 03 '25 22:12 joprice