I\'m getting this error from my node app:
ENOENT, no such file or directory \'~/Desktop/MyApp/newversion/partials/navigation.jade\'
I know
I had that issue : use path module
const path = require('path');
and also do not forget to create the uploads directory first period.
I was also plagued by this error, and after trying all the other answers, magically found the following solution:
Delete package-lock.json and the node_modules folder, then run npm install again.
If that doesn't work, try running these in order:
npm install
npm cache clean --force
npm install -g npm
npm install
(taken from @Thisuri's answer and @Mathias Falci's comment respectively)
and then re-deleting the above files and re-running npm install.
Worked for me!
Specifically, rm yarn.lock and then yarn install fixed this for me.
Tilde expansion is a shell thing. Write the proper pathname (probably /home/yourusername/Desktop/etcetcetc) or use
process.env.HOME + '/Desktop/blahblahblah'
I believe the previous answer is the correct answer to this problem but I was getting this error when I tried installing npm package (see below) :
The fix for me was : npm init --yes
npm install ,if the issue is not yet fixed try the following one after the other.npm cache clean ,thennpm install -g npm,then
npm install,Finallyng serve --o to run the project.
Hope this will help....