Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not add a beforeunload event listener when running inside NodeJS #453

Closed
wants to merge 1 commit into from

Conversation

theasp
Copy link
Collaborator

@theasp theasp commented Sep 19, 2024

This solves this problem:

SHADOW import error /home/asp/projects/xxx/.shadow-cljs/builds/server/dev/out/cljs-runtime/taoensso.sente.js

/home/asp/projects/xxx/target/private/js/server.js:64
  /* ignore this, look at stacktrace */ fn.call(global, require, module, __filename, __dirname);
                                           ^
TypeError: goog.global.addEventListener is not a function
    at /home/asp/projects/xxx/.shadow-cljs/builds/server/dev/out/cljs-runtime/taoensso/sente.cljc:1353:4
    at global.SHADOW_IMPORT (/home/asp/projects/xxx/target/private/js/server.js:64:44)
    at /home/asp/projects/xxx/target/private/js/server.js:1624:1
    at Object.<anonymous> (/home/asp/projects/xxx/target/private/js/server.js:1638:3)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Function.Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47

This solves this problem:
```
SHADOW import error /home/asp/projects/xxx/.shadow-cljs/builds/server/dev/out/cljs-runtime/taoensso.sente.js

/home/asp/projects/xxx/target/private/js/server.js:64
  /* ignore this, look at stacktrace */ fn.call(global, require, module, __filename, __dirname);
                                           ^
TypeError: goog.global.addEventListener is not a function
    at /home/asp/projects/xxx/.shadow-cljs/builds/server/dev/out/cljs-runtime/taoensso/sente.cljc:1353:4
    at global.SHADOW_IMPORT (/home/asp/projects/xxx/target/private/js/server.js:64:44)
    at /home/asp/projects/xxx/target/private/js/server.js:1624:1
    at Object.<anonymous> (/home/asp/projects/xxx/target/private/js/server.js:1638:3)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Function.Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47
```
@theasp theasp added the bug label Sep 19, 2024
@ptaoussanis
Copy link
Member

@theasp Thanks for this Andrew! Any urgency from your end for a new release, or could it wait a few weeks while I finish up some other stuff?

@theasp
Copy link
Collaborator Author

theasp commented Sep 19, 2024

Hi Peter,

No urgency on my part, take your time. I didn't even notice for over a year!

@ptaoussanis
Copy link
Member

Merging manually now, thanks again Andrew!

ptaoussanis pushed a commit that referenced this pull request Oct 28, 2024
…ing inside NodeJS (@theasp)

This solves this problem:
```
SHADOW import error /home/asp/projects/xxx/.shadow-cljs/builds/server/dev/out/cljs-runtime/taoensso.sente.js

/home/asp/projects/xxx/target/private/js/server.js:64
  /* ignore this, look at stacktrace */ fn.call(global, require, module, __filename, __dirname);
                                           ^
TypeError: goog.global.addEventListener is not a function
    at /home/asp/projects/xxx/.shadow-cljs/builds/server/dev/out/cljs-runtime/taoensso/sente.cljc:1353:4
    at global.SHADOW_IMPORT (/home/asp/projects/xxx/target/private/js/server.js:64:44)
    at /home/asp/projects/xxx/target/private/js/server.js:1624:1
    at Object.<anonymous> (/home/asp/projects/xxx/target/private/js/server.js:1638:3)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Function.Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants