Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Possible bad command line mangling: Unknown command: "[...]/@appland/appmap-agent-js/lib/node/recorder-mocha.mjs #180

Open
dividedmind opened this issue Jan 19, 2023 · 1 comment

Comments

@dividedmind
Copy link
Contributor

Error seen in telemetry.

Called by /Users/user/Develop/.npm/_npx/3007b677135bbf3c/node_modules/.bin/appmap record test -d /Users/user/Develop/abc/app/:

npx @appland/appmap-agent-js --recorder=mocha -- npm run mocha
===
{}
===
(node:74639) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Treating main file as commonjs, this might not always be appropriate -- cf: https://github.com/nodejs/node/issues/41465
Unknown command: "/Users/user/Develop/.npm/_npx/5cc1c6504f9acf64/node_modules/@appland/appmap-agent-js/lib/node/recorder-mocha.mjs"

To see a list of supported npm commands, run:
npm help
@lachrist
Copy link
Contributor

The problem is that we are not supporting invoking mocha through npm run. For that we would need to parse and hook the command of scripts.test in package.json. We could at least provide a better error message

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants