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

Windows binary MODULE_NOT_FOUND #1545

Open
maxb2 opened this issue Sep 23, 2021 · 5 comments
Open

Windows binary MODULE_NOT_FOUND #1545

maxb2 opened this issue Sep 23, 2021 · 5 comments

Comments

@maxb2
Copy link
Member

maxb2 commented Sep 23, 2021

From scrid2000 on Discord:

D:\DnD\Dungeon Revealer>"D:\DnD\Dungeon Revealer\dungeon-revealer-windows.exe"
node:internal/modules/cjs/loader:930
  throw err;
  ^

Error: Cannot find module 'C:\Users\SCrid\AppData\Local\Temp\caxa\applications\dungeon-revealer-windows\3bn3q6shhl\0\server-build\index.js'
←[90m    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:927:15)←[39m
←[90m    at Function.Module._load (node:internal/modules/cjs/loader:772:27)←[39m
←[90m    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)←[39m
←[90m    at node:internal/main/run_main_module:17:47←[39m {
  code: ←[32m'MODULE_NOT_FOUND'←[39m,
  requireStack: []
}

It seems that Windows is periodically deleting individual files from the temporary directory.
The current workaround is to delete the C:\Users\user\AppData\Local\Temp\caxa\applications\dungeon-revealer-windows folder and rerun the binary.

@ChriD
Copy link

ChriD commented Sep 25, 2021

Yes, i can confirm that problem! Happens to me as well!

@savethebyte
Copy link

It is happening to me as well. I am receiving the error:

C:\Users\dnd\dungeonrevealer\dungeon-revealer-windows-v1.16.0> .\dungeon-revealer-windows.exe
2021/11/06 09:40:42 caxa stub: Failed to run command: exec: "C:\\Users\\dnd\\AppData\\Local\\Temp/caxa/applications/dungeon-revealer-windows\\3bn3q6shhl/0/node_modules/.bin/node": file does not exist

The workaround @maxb2 is using works for this issue as well.

@maxb2
Copy link
Member Author

maxb2 commented Nov 8, 2021

Unfortunately, it's an upstream bug. We can't do much about it without caxa being fixed first.

@MyrddinEmrys
Copy link

MyrddinEmrys commented Jun 13, 2022

I had this same issue on Mac, posting my process here in case someone like me has this issue later on Mac:
MODULE_NOT_FOUND error
I'm not a developer/not familiar with debugging these kinds of things but was able to implement the temporary workaround by doing much the same thing suggested by @maxb2, going into my temporary folder with "open $TMPDIR" in Terminal on Mac and then deleting this folder:
Folder to Delete

@maxb2
Copy link
Member Author

maxb2 commented Aug 11, 2022

Submitted a PR upstream to fix this: leafac/caxa#60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants