getappmap / getappmap/appmap-js

Warn users against using `npx` in test commands

Open
#843 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
53
Forks
18
Avg merge
3d 18h
Merged PRs (30d)
8

Description

When a user is asked for the test command for a javascript project, it really should be a command in the local environment. At least one user have tried npx mocha as the test command; it's not clear if it even works without appmap agent, but with it, it fails miserably (because the agent tries to find mocha outside of the environment created by npx):

npx @appland/appmap-agent-js --recorder=mocha -- npx mocha
...
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'mocha' imported from /Users/user/.npm/_npx/5cc1c6504f9acf64/node_modules/@appland/appmap-agent-js/lib/node/mocha-loader.mjs

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by locating where JavaScript test commands are documented or processed, then review the npx failure shown in the issue. Done means users are clearly warned to use a command from the local environment and the guidance accounts for AppMap's JavaScript agent.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
documentation, testing
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.