getappmap / appmap-agent-js

This project is deprecated. Please use https://github.com/getappmap/appmap-node/ to record Node.js applications.
Other
28 stars 8 forks source link

Recommended command "npx appmap-agent-js" does not find the package in NPM #163

Open kgilpin opened 1 year ago

kgilpin commented 1 year ago

I am using the instructions for recording jest test cases.

The suggested command does not find the package in NPM.

✗ npx appmap-agent-js --command="npm run jest" 
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/appmap-agent-js - Not found
npm ERR! 404 
npm ERR! 404  'appmap-agent-js@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kgilpin/.npm/_logs/2022-12-23T22_04_19_749Z-debug.log
Install for [ 'appmap-agent-js@latest' ] failed with code 1
lachrist commented 1 year ago

It is assumed that the user already installed the agent either via the installer or directly by running npm install --save-dev @appland/appmap-agent-js. Here, we use npx for execution not for installation. Afaik there is no npm command that only performs package execution. And I don't think it is wise to suggest npx @appland/appmap-agent-js -- npx jest because we want to list the agent in the project dev dependencies. So maybe it is just a matter of communicating this info to the user?

lachrist commented 1 year ago

@kgilpin I think we should make it explicit in the doc that this command will only work if the agent has already been installed. What do you think?

kgilpin commented 1 year ago

What about yarn? Suggesting npx anything is confusing for Yarn users.

On Fri, Dec 30, 2022 at 7:50 AM Laurent Christophe @.***> wrote:

@kgilpin https://github.com/kgilpin I think we should make it explicit in the doc that this command will only work if the agent has already been installed. What do you think?

— Reply to this email directly, view it on GitHub https://github.com/getappmap/appmap-agent-js/issues/163#issuecomment-1367902796, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVC63SQERIG536WPS3ZG3WP3LCXANCNFSM6AAAAAATICZOBI . You are receiving this because you were mentioned.Message ID: @.***>