getappmap / appmap-node

AppMap client agent for Node.js
Other
10 stars 4 forks source link

MODULE_NOT_FOUND error when running npx appmap-node <command> #126

Closed RaphKa02 closed 7 months ago

RaphKa02 commented 8 months ago

run command: npx appmap-node yarn run dev

(Λ) Running with appmap-node version 2.18.0
(Λ) Using config file C:\Users\My NameWithSpace\Projekt\appmap.yml
node:internal/modules/cjs/loader:1078
  throw err;
  ^

Error: Cannot find module 'C:\Users\My'
Require stack:
- internal/preload
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at internalRequire (node:internal/modules/cjs/loader:174:19)
    at Module._preloadModules (node:internal/modules/cjs/loader:1431:5)
    at loadPreloadModules (node:internal/process/pre_execution:606:5)
    at setupUserModules (node:internal/process/pre_execution:118:3)
    at prepareExecution (node:internal/process/pre_execution:109:5)
    at prepareMainThreadExecution (node:internal/process/pre_execution:37:3)
    at node:internal/main/run_main_module:10:1 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ 'internal/preload' ]
}

Node.js v18.16.0

The path is split at a space character.

dividedmind commented 8 months ago

@RaphKa02 this is a known issue in npx: https://github.com/npm/cli/issues/502 See #122 for workarounds, but you might be able to just npm i -g npm@7. Lmk if it helps!

dividedmind commented 7 months ago

Closing as duplicate of #122

@RaphKa02 This issue should be fixed now, make sure to run with npx appmap-node@latest to force upgrade. Please reopen if you're still seeing the problem. Thanks!