Having been learnig node and just trying to advance my skills (errors are an inevitability...)
I was trying to play with an npm package (any-text) and messed up my local project files to the point where the server would no longer run.
I've fixed that by copying all the non-user generated files from a blank project and the server now runs / functions correctly but i'm still getting a localweb server error:
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'E:\My Drive\Wappler\arg2\node_modules\nodemon\bin\nodemon.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
This file path doesn't exist 'E:\My Drive\Wappler\arg2\node_modules\nodemon\bin\nodemon.js'
and doesn't in a standard project directory setup.
I'm sure this is a node dependancy or npm issue but not sure how to remove this error.
Its annoying and want to understand (the learning part...)
Any help would be gratefully appreciated and or advice.
Cheers Jon
@Apple - tried that with no difference, the node_module folder hasnt been recreated but there is no change to the problem or the operation of the app?
@franse - In this instance It is, but it doesn't seem to make a difference whether it is located here or out of the drive on my machine. (it's a true local folder and i only turn google drive on to sync folders when i'm done at the end of a session) .
It doesnt seem to be affecting the operation of the local server or app, I would just like to understand the why?
If i make a completely blank node project its still throwing the same error which makes me think its more node server/npm related rather than my project or wappler per se.
I've tried updating node/npm after the problem appeared, but that hasn't changed anything either (the problem or my apps function)
I resorted to re-installing wappler but that has made no difference.
Appologies for the delayed response (life and stuff) and thanks for the help.
I get the same error even if i make a new wappler node project anywhere on my system.
@franse I tried that and the same outcome is occuring, google drive doesn't seem to make a difference...... but big caveat it seems that npm throws errors wth folders directly in the Gdrive
The only way I can seem to fix this is to directly run npm install in the folder. That seems to be for any project: old, new, in gdrive or out of gdrive.
It got rid of the error so I'm happy!
Thanks for the assistance as always from this helpful community.