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

AppMap Agent Install: Downgrade from NodeJs 20 to 18.18 and Errors #247

Open
iPoetDev opened this issue Oct 2, 2023 · 4 comments
Open

Comments

@iPoetDev
Copy link

iPoetDev commented Oct 2, 2023

Folks

After prior contact with Garrett on AppMap in August, I unwound NodeJS 20 and installed the LTS version (18.18.0)

I want to inspect my code base from PyCharm, and I am still getting issues

Should I remove all instances of npm-cache (I think I did manually from Lates to LTS)

I did remove D:\\Code\\node_modules\\ manually.

What are the steps (additional prequistes installs) I need to do (please be gentle with me, step by step please)... am a bit flumoxed?

npx @appland/appmap install
Need to install the following packages:
@appland/[email protected]
Ok to proceed? (y) y
npm WARN deprecated [email protected]: Please switch to @apidevtools/json-schema-ref-parser
npm WARN deprecated [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated @types/[email protected]: This is a stub types definition. form-data provides its own type definitions, so you do not need this installed.
node:internal/modules/cjs/loader:1080
  throw err;
  ^

Error: Cannot find module '../build/Release/canvas.node'
Require stack:
- Dir:\Code\node_modules\canvas\lib\bindings.js
- Dir:\Code\node_modules\canvas\lib\canvas.js
- Dir:\Code\node_modules\canvas\index.js
- OSDir:\Users\<user>\AppData\Local\npm-cache\_npx\3007b677135bbf3c\node_modules\jsdom\lib\jsdom\utils.js
- OSDir:\Users\<user>\AppData\Local\npm-cache\_npx\3007b677135bbf3c\node_modules\jsdom\lib\jsdom\living\events\MouseEvent-impl.js
- OSDir:\Users\<user>\AppData\Local\npm-cache\_npx\3007b677135bbf3c\node_modules\jsdom\lib\jsdom\living\generated\MouseEvent.js
- OSDir:\Users\<user>\AppData\Local\npm-cache\_npx\3007b677135bbf3c\node_modules\jsdom\lib\jsdom\living\events\EventTarget-impl.js
- OSDir:\Users\<user>\AppData\Local\npm-cache\_npx\3007b677135bbf3c\node_modules\jsdom\lib\jsdom\living\generated\EventTarget.js
- OSDir:\Users\<user>\AppData\Local\npm-cache\_npx\3007b677135bbf3c\node_modules\jsdom\lib\jsdom\living\interfaces.js
- OSDir:\Users\<user>\AppData\Local\npm-cache\_npx\3007b677135bbf3c\node_modules\jsdom\lib\jsdom\browser\Window.js
- OSDir:\Users\<user>\AppData\Local\npm-cache\_npx\3007b677135bbf3c\node_modules\jsdom\lib\api.js
- OSDir:\Users\<user>\AppData\Local\npm-cache\_npx\3007b677135bbf3c\node_modules\@appland\appmap\built\cmds\agentInstaller\mavenInstaller.js
- OSDir:\Users\<user>\AppData\Local\npm-cache\_npx\3007b677135bbf3c\node_modules\@appland\appmap\built\cmds\agentInstaller\installers.js
- OSDir:\Users\<user>\AppData\Local\npm-cache\_npx\3007b677135bbf3c\node_modules\@appland\appmap\built\cmds\agentInstaller\install-agent.js
- OSDir:\Users\<user>\AppData\Local\npm-cache\_npx\3007b677135bbf3c\node_modules\@appland\appmap\built\cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at Module.patchedRequire (OSDir:\Users\<user>\AppData\Local\npm-cache\_npx\3007b677135bbf3c\node_modules\diagnostic-channel\dist\src\patchRequire.js:16:46)
    at Hook._require.Module.require (OSDir:\Users\<user>\AppData\Local\npm-cache\_npx\3007b677135bbf3c\node_modules\require-in-the-middle\index.js:167:34)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (Dir:\Code\node_modules\canvas\lib\bindings.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'Dir:\\Code\\node_modules\\canvas\\lib\\bindings.js',
    'Dir:\\Code\\node_modules\\canvas\\lib\\canvas.js',
    'Dir:\\Code\\node_modules\\canvas\\index.js',
    'OSDir:\\Users\\<user>\\AppData\\Local\\npm-cache\\_npx\\3007b677135bbf3c\\node_modules\\jsdom\\lib\\jsdom\\utils.js',
    'OSDir:\\Users\\<user>\\AppData\\Local\\npm-cache\\_npx\\3007b677135bbf3c\\node_modules\\jsdom\\lib\\jsdom\\living\\events\\MouseEvent-impl.js',
    'OSDir:\\Users\\<user>\\AppData\\Local\\npm-cache\\_npx\\3007b677135bbf3c\\node_modules\\jsdom\\lib\\jsdom\\living\\generated\\MouseEvent.js',
    'OSDir:\\Users\\<user>\\AppData\\Local\\npm-cache\\_npx\\3007b677135bbf3c\\node_modules\\jsdom\\lib\\jsdom\\living\\events\\EventTarget-impl.js',
    'OSDir:\\Users\\<user>\\AppData\\Local\\npm-cache\\_npx\\3007b677135bbf3c\\node_modules\\jsdom\\lib\\jsdom\\living\\generated\\EventTarget.js',
    'OSDir:\\Users\\<user>\\AppData\\Local\\npm-cache\\_npx\\3007b677135bbf3c\\node_modules\\jsdom\\lib\\jsdom\\living\\interfaces.js',
    'OSDir:\\Users\\<user>\\AppData\\Local\\npm-cache\\_npx\\3007b677135bbf3c\\node_modules\\jsdom\\lib\\jsdom\\browser\\Window.js',
    'OSDir:\\Users\\<user>\\AppData\\Local\\npm-cache\\_npx\\3007b677135bbf3c\\node_modules\\jsdom\\lib\\api.js',
    'OSDir:\\Users\\<user>\\AppData\\Local\\npm-cache\\_npx\\3007b677135bbf3c\\node_modules\\@appland\\appmap\\built\\cmds\\agentInstaller\\mavenInstaller.js',
    'OSDir:\\Users\\<user>\\AppData\\Local\\npm-cache\\_npx\\3007b677135bbf3c\\node_modules\\@appland\\appmap\\built\\cmds\\agentInstaller\\installers.js',
    'OSDir:\\Users\\<user>\\AppData\\Local\\npm-cache\\_npx\\3007b677135bbf3c\\node_modules\\@appland\\appmap\\built\\cmds\\agentInstaller\\install-agent.js',
    'OSDir:\\Users\\<user>\\AppData\\Local\\npm-cache\\_npx\\3007b677135bbf3c\\node_modules\\@appland\\appmap\\built\\cli.js'
  ]
}

`Some details redacted`

Node.js v18.18.0
@brikelly
Copy link
Contributor

brikelly commented Oct 4, 2023

Hi there @iPoetDev , thanks for raising this. I think your best bet is to use the binary releases of the appmap tool, which will avoid all the npm issues.

This link describes what you need to do to download it from the GitHub releases area. Then it should be a simple matter of running the command using appmap install instead of npx @appland/appmap install.

Also, you could always do a manual installation of the AppMap python library into your Python project if you'd prefer. Details on how to do that are here.

@iPoetDev
Copy link
Author

iPoetDev commented Oct 4, 2023

Ok, so stepwise, how do I get from here to an clean install of AppMap. I have BulkCrap Installer to super clean uninstalls.

@iPoetDev
Copy link
Author

iPoetDev commented Oct 4, 2023

Thank you so much. I worked it out.

and super, super product, I recommended to my fellow students and learnings in the Code Institute (Ireland)

@kgilpin
Copy link
Contributor

kgilpin commented Oct 4, 2023

I'm glad you're all setup now! And thanks for using & recommending AppMap :-)

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

3 participants