getappmap / appmap-agent-js

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

Various errors running jest with the agent on Node 14 #229

Closed dividedmind closed 1 year ago

dividedmind commented 1 year ago

While trying to use the agent to record appmap-js on Node 14, I've encountered an assortment of errors:

➤ YN0000: [@appland/appmap]: ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From tests/unit/agentInstall/installCommand.spec.ts.

➤ YN0000: [@appland/appmap]: 

➤ YN0000: [@appland/appmap]:       at ../../node_modules/@appland/appmap-agent-js/lib/node/recorder.mjs:16:37

➤ YN0000: [@appland/appmap]: 

➤ YN0000: [@appland/appmap]: ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From tests/unit/agentInstall/installCommand.spec.ts.

➤ YN0000: [@appland/appmap]: 

➤ YN0000: [@appland/appmap]: 

➤ YN0000: [@appland/appmap]: FAIL tests/unit/fingerprint/fingerprintWatchCommand.spec.ts

➤ YN0000: [@appland/appmap]:   ● Test suite failed to run

➤ YN0000: [@appland/appmap]: 

➤ YN0000: [@appland/appmap]:     Error [ERR_VM_MODULE_NOT_MODULE]: Provided module is not an instance of Module

➤ YN0000: [@appland/appmap]: 

➤ YN0000: [@appland/appmap]:       at ../../node_modules/@appland/appmap-agent-js/lib/node/recorder.mjs:15:25

➤ YN0000: [@appland/appmap]: 

➤ YN0000: [@appland/appmap]: 

➤ YN0000: [@appland/appmap]: ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From tests/unit/agentInstall/installCommand.spec.ts.

➤ YN0000: [@appland/appmap]: 

➤ YN0000: [@appland/appmap]:       at ../../node_modules/@appland/appmap-agent-js/lib/node/recorder.mjs:16:37

➤ YN0000: [@appland/appmap]: 

➤ YN0000: [@appland/appmap]: ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From tests/unit/agentInstall/installCommand.spec.ts.

➤ YN0000: [@appland/appmap]: 

➤ YN0000: [@appland/appmap]: 

➤ YN0000: [@appland/appmap]: FAIL tests/unit/record/record.test.spec.ts
kgilpin commented 1 year ago

Also with Node 16? Curious because Node 14 is EOL

On Sun, Jun 4, 2023 at 10:50 AM Rafał Rzepecki @.***> wrote:

While trying to use the agent to record appmap-js on Node 14, I've encountered an assortment of errors https://app.travis-ci.com/github/getappmap/appmap-js/jobs/603360651#L981 :

➤ YN0000: @.***/appmap]: ReferenceError: You are trying to import a file after the Jest environment has been torn down. From tests/unit/agentInstall/installCommand.spec.ts.

➤ YN0000: @.***/appmap]:

➤ YN0000: @./appmap]: at ..@./appmap-agent-js/lib/node/recorder.mjs:16:37

➤ YN0000: @.***/appmap]:

➤ YN0000: @.***/appmap]: ReferenceError: You are trying to import a file after the Jest environment has been torn down. From tests/unit/agentInstall/installCommand.spec.ts.

➤ YN0000: @.***/appmap]:

➤ YN0000: @.***/appmap]:

➤ YN0000: @.***/appmap]: FAIL tests/unit/fingerprint/fingerprintWatchCommand.spec.ts

➤ YN0000: @.***/appmap]: ● Test suite failed to run

➤ YN0000: @.***/appmap]:

➤ YN0000: @.***/appmap]: Error [ERR_VM_MODULE_NOT_MODULE]: Provided module is not an instance of Module

➤ YN0000: @.***/appmap]:

➤ YN0000: @./appmap]: at ..@./appmap-agent-js/lib/node/recorder.mjs:15:25

➤ YN0000: @.***/appmap]:

➤ YN0000: @.***/appmap]:

➤ YN0000: @.***/appmap]: ReferenceError: You are trying to import a file after the Jest environment has been torn down. From tests/unit/agentInstall/installCommand.spec.ts.

➤ YN0000: @.***/appmap]:

➤ YN0000: @./appmap]: at ..@./appmap-agent-js/lib/node/recorder.mjs:16:37

➤ YN0000: @.***/appmap]:

➤ YN0000: @.***/appmap]: ReferenceError: You are trying to import a file after the Jest environment has been torn down. From tests/unit/agentInstall/installCommand.spec.ts.

➤ YN0000: @.***/appmap]:

➤ YN0000: @.***/appmap]:

➤ YN0000: @.***/appmap]: FAIL tests/unit/record/record.test.spec.ts

— Reply to this email directly, view it on GitHub https://github.com/getappmap/appmap-agent-js/issues/229, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVC66V4EDYWRA6ZLNW5XTXJSOB5ANCNFSM6AAAAAAYZ7XMOU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

dividedmind commented 1 year ago

Also with Node 16? Curious because Node 14 is EOL On Sun, Jun 4, 2023 at 10:50 AM Rafał Rzepecki @.> wrote: While trying to use the agent to record appmap-js on Node 14, I've encountered an assortment of errors https://app.travis-ci.com/github/getappmap/appmap-js/jobs/603360651#L981 : ➤ YN0000: @./appmap]: ReferenceError: You are trying to import a file after the Jest environment has been torn down. From tests/unit/agentInstall/installCommand.spec.ts. ➤ YN0000: @./appmap]: ➤ YN0000: @./appmap]: at ..@./appmap-agent-js/lib/node/recorder.mjs:16:37 ➤ YN0000: @./appmap]: ➤ YN0000: @./appmap]: ReferenceError: You are trying to import a file after the Jest environment has been torn down. From tests/unit/agentInstall/installCommand.spec.ts. ➤ YN0000: @./appmap]: ➤ YN0000: @./appmap]: ➤ YN0000: @./appmap]: FAIL tests/unit/fingerprint/fingerprintWatchCommand.spec.ts ➤ YN0000: @./appmap]: ● Test suite failed to run ➤ YN0000: @./appmap]: ➤ YN0000: @./appmap]: Error [ERR_VM_MODULE_NOT_MODULE]: Provided module is not an instance of Module ➤ YN0000: @./appmap]: ➤ YN0000: @./appmap]: at ..@./appmap-agent-js/lib/node/recorder.mjs:15:25 ➤ YN0000: @./appmap]: ➤ YN0000: @./appmap]: ➤ YN0000: @./appmap]: ReferenceError: You are trying to import a file after the Jest environment has been torn down. From tests/unit/agentInstall/installCommand.spec.ts. ➤ YN0000: @./appmap]: ➤ YN0000: @./appmap]: at ..@./appmap-agent-js/lib/node/recorder.mjs:16:37 ➤ YN0000: @./appmap]: ➤ YN0000: @./appmap]: ReferenceError: You are trying to import a file after the Jest environment has been torn down. From tests/unit/agentInstall/installCommand.spec.ts. ➤ YN0000: @./appmap]: ➤ YN0000: @./appmap]: ➤ YN0000: @./appmap]: FAIL tests/unit/record/record.test.spec.ts — Reply to this email directly, view it on GitHub <#229>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVC66V4EDYWRA6ZLNW5XTXJSOB5ANCNFSM6AAAAAAYZ7XMOU . You are receiving this because you are subscribed to this thread.Message ID: @.>

It's fine on 16. Should I close WONTFIX then? We're still testing appmap-js on 14, that's how this came up.

kgilpin commented 1 year ago

Won't fix, Node 14 is no longer supported.