I\'m getting this error from my node app:
ENOENT, no such file or directory \'~/Desktop/MyApp/newversion/partials/navigation.jade\'
I know
__dirname
Gives you the current node application's rooth directory.
In your case, you'd use
__dirname + '/Desktop/MyApp/newversion/partials/navigation.jade';
See this answer:
App base path from a module in NodeJS
Another possibility is that you are missing an .npmrc
file if you are pulling any packages that are not publicly available.
You will need to add an .npmrc
file at the root directory and add the private/internal registry inside of the .npmrc
file like this:
registry=http://private.package.source/secret/npm-packages/
For me, it was having my code folder in Dropbox on windows 10. During the build process Dropbox would flip out over having more than 500,000 files. I moved my folder out and now it builds fine!
For those running Laravel Mix with npm run watch
, just terminate the script and run the command again.