ENOENT, no such file or directoryApp base path from a module in NodeJSnpm cordova error prevent installNPM Install ENOENT no such file or directoryNodejs: Error while downloading multiple files by looping through array of linksGetting Started with Angular 2Writing files in Node.jsCheck synchronously if file/directory exists in Node.jsWhat is this Javascript “require”?Read a file in Node.jsWhat's the difference between dependencies, devDependencies and peerDependencies in npm package.json file?Node.js/Windows error: ENOENT, stat 'C:UsersRTAppDataRoamingnpm'How do I debug “Error: spawn ENOENT” on node.js?Error: ENOENT: no such file or directory, open './views/s.ejs' Nodejs ExpressFix relative path issue: ENOENT: no such file or directory?How to resolve 'Error: ENOENT: no such file or directory' in Nodejs

Is there a word for returning to unpreparedness?

Typesetting "hollow slash"

What should we do with manuals from the 80s?

"sh -c" does not expand positional parameters, if I run it from "sudo --login". Is there a way around this?

A Magic Diamond

Physical Interpretation of an Overdamped Pendulum

What exactly happened to the 18 crew members who were reported as "missing" in "Q Who"?

Weird resistor with dots around it on the schematic

Can anybody tell me who this Pokemon is?

Will some rockets really collapse under their own weight?

Are there any cons in using rounded corners for bar graphs?

May the tower use the runway while an emergency aircraft is inbound?

Is a USB 3.0 device possible with a four contact USB 2.0 connector?

Set theory with antielements?

What is the question mark?

What is the opposite of "hunger level"?

What ways are there to share spells between characters, besides a Ring of Spell Storing?

How to train a replacement without them knowing?

If a person claims to know anything could it be disproven by saying 'prove that we are not in a simulation'?

Is there a fallacy about "appeal to 'big words'"?

Has the speed of light ever been measured in vacuum?

What allows us to use imaginary numbers?

Why do we use low resistance cables to minimize power losses?

What should I do with the stock I own if I anticipate there will be a recession?



ENOENT, no such file or directory


App base path from a module in NodeJSnpm cordova error prevent installNPM Install ENOENT no such file or directoryNodejs: Error while downloading multiple files by looping through array of linksGetting Started with Angular 2Writing files in Node.jsCheck synchronously if file/directory exists in Node.jsWhat is this Javascript “require”?Read a file in Node.jsWhat's the difference between dependencies, devDependencies and peerDependencies in npm package.json file?Node.js/Windows error: ENOENT, stat 'C:UsersRTAppDataRoamingnpm'How do I debug “Error: spawn ENOENT” on node.js?Error: ENOENT: no such file or directory, open './views/s.ejs' Nodejs ExpressFix relative path issue: ENOENT: no such file or directory?How to resolve 'Error: ENOENT: no such file or directory' in Nodejs






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








31















I'm getting this error from my node app:



ENOENT, no such file or directory '~/Desktop/MyApp/newversion/partials/navigation.jade'


I know the file is there because when I try to open the file using the exact copied and pasted path, it works.
I also know the application is using the right directory because, well, it outputs it in the error.










share|improve this question



















  • 1





    Delete package-lock.json and run npm install again

    – Mathias Falci
    Mar 20 at 16:10

















31















I'm getting this error from my node app:



ENOENT, no such file or directory '~/Desktop/MyApp/newversion/partials/navigation.jade'


I know the file is there because when I try to open the file using the exact copied and pasted path, it works.
I also know the application is using the right directory because, well, it outputs it in the error.










share|improve this question



















  • 1





    Delete package-lock.json and run npm install again

    – Mathias Falci
    Mar 20 at 16:10













31












31








31


6






I'm getting this error from my node app:



ENOENT, no such file or directory '~/Desktop/MyApp/newversion/partials/navigation.jade'


I know the file is there because when I try to open the file using the exact copied and pasted path, it works.
I also know the application is using the right directory because, well, it outputs it in the error.










share|improve this question














I'm getting this error from my node app:



ENOENT, no such file or directory '~/Desktop/MyApp/newversion/partials/navigation.jade'


I know the file is there because when I try to open the file using the exact copied and pasted path, it works.
I also know the application is using the right directory because, well, it outputs it in the error.







node.js express






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 24 '13 at 1:16









Kinnard HockenhullKinnard Hockenhull

8373 gold badges16 silver badges30 bronze badges




8373 gold badges16 silver badges30 bronze badges










  • 1





    Delete package-lock.json and run npm install again

    – Mathias Falci
    Mar 20 at 16:10












  • 1





    Delete package-lock.json and run npm install again

    – Mathias Falci
    Mar 20 at 16:10







1




1





Delete package-lock.json and run npm install again

– Mathias Falci
Mar 20 at 16:10





Delete package-lock.json and run npm install again

– Mathias Falci
Mar 20 at 16:10












7 Answers
7






active

oldest

votes


















15














Tilde expansion is a shell thing. Write the proper pathname (probably /home/yourusername/Desktop/etcetcetc) or use
process.env.HOME + '/Desktop/blahblahblah'






share|improve this answer

























  • Hmm, I thought that was handled by app.locals.basedir = '~/Desktop/BitBox/thenewbox'; I tried app.set('home', process.env.HOME || '/Users/Kinnard/Desktop/BitBox/thenewbox'); But that didn't work, same error.

    – Kinnard Hockenhull
    Dec 24 '13 at 1:43












  • Ok, just changing app.locals.basedir = '~/Desktop/BitBox/thenewbox'; to the absolute path worked. Thanks!

    – Kinnard Hockenhull
    Dec 24 '13 at 1:44












  • This got me too :D

    – blong
    Mar 19 '15 at 23:50











  • I'm having this error too. I have no path: ..node_module/rxjs. What am i doing wrong? my issue: ** ./node_modules/rxjs/_esm5/index.js Module build failed: Error: ENOENT: no such file or directory, open '..ClientAppnode_modulesrxjs_esm5index.js'**

    – pnet
    Jul 4 '18 at 18:55











  • You might want to look at this answer: stackoverflow.com/questions/21637099/…

    – BraveNewMath
    Dec 21 '18 at 0:37


















20














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) :



enter image description here



The fix for me was : npm init --yes



enter image description here






share|improve this answer
































    2














    I had that issue : use path module



    const path = require('path');


    and also do not forget to create the uploads directory first period.






    share|improve this answer


































      2














      1. First try npm install ,if the issue is not yet fixed try the following one after the other.


      2. npm cache clean ,then


      3. npm install -g npm,then
        npm install,Finally


      4. ng serve --o to run the project.
        Hope this will help....





      share|improve this answer


































        1














        __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






        share|improve this answer
































          0














          For those running Laravel Mix with npm run watch, just terminate the script and run the command again.






          share|improve this answer
































            0














            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/





            share|improve this answer

























              protected by eyllanesc Apr 27 '18 at 16:42



              Thank you for your interest in this question.
              Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



              Would you like to answer one of these unanswered questions instead?














              7 Answers
              7






              active

              oldest

              votes








              7 Answers
              7






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              15














              Tilde expansion is a shell thing. Write the proper pathname (probably /home/yourusername/Desktop/etcetcetc) or use
              process.env.HOME + '/Desktop/blahblahblah'






              share|improve this answer

























              • Hmm, I thought that was handled by app.locals.basedir = '~/Desktop/BitBox/thenewbox'; I tried app.set('home', process.env.HOME || '/Users/Kinnard/Desktop/BitBox/thenewbox'); But that didn't work, same error.

                – Kinnard Hockenhull
                Dec 24 '13 at 1:43












              • Ok, just changing app.locals.basedir = '~/Desktop/BitBox/thenewbox'; to the absolute path worked. Thanks!

                – Kinnard Hockenhull
                Dec 24 '13 at 1:44












              • This got me too :D

                – blong
                Mar 19 '15 at 23:50











              • I'm having this error too. I have no path: ..node_module/rxjs. What am i doing wrong? my issue: ** ./node_modules/rxjs/_esm5/index.js Module build failed: Error: ENOENT: no such file or directory, open '..ClientAppnode_modulesrxjs_esm5index.js'**

                – pnet
                Jul 4 '18 at 18:55











              • You might want to look at this answer: stackoverflow.com/questions/21637099/…

                – BraveNewMath
                Dec 21 '18 at 0:37















              15














              Tilde expansion is a shell thing. Write the proper pathname (probably /home/yourusername/Desktop/etcetcetc) or use
              process.env.HOME + '/Desktop/blahblahblah'






              share|improve this answer

























              • Hmm, I thought that was handled by app.locals.basedir = '~/Desktop/BitBox/thenewbox'; I tried app.set('home', process.env.HOME || '/Users/Kinnard/Desktop/BitBox/thenewbox'); But that didn't work, same error.

                – Kinnard Hockenhull
                Dec 24 '13 at 1:43












              • Ok, just changing app.locals.basedir = '~/Desktop/BitBox/thenewbox'; to the absolute path worked. Thanks!

                – Kinnard Hockenhull
                Dec 24 '13 at 1:44












              • This got me too :D

                – blong
                Mar 19 '15 at 23:50











              • I'm having this error too. I have no path: ..node_module/rxjs. What am i doing wrong? my issue: ** ./node_modules/rxjs/_esm5/index.js Module build failed: Error: ENOENT: no such file or directory, open '..ClientAppnode_modulesrxjs_esm5index.js'**

                – pnet
                Jul 4 '18 at 18:55











              • You might want to look at this answer: stackoverflow.com/questions/21637099/…

                – BraveNewMath
                Dec 21 '18 at 0:37













              15












              15








              15







              Tilde expansion is a shell thing. Write the proper pathname (probably /home/yourusername/Desktop/etcetcetc) or use
              process.env.HOME + '/Desktop/blahblahblah'






              share|improve this answer













              Tilde expansion is a shell thing. Write the proper pathname (probably /home/yourusername/Desktop/etcetcetc) or use
              process.env.HOME + '/Desktop/blahblahblah'







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Dec 24 '13 at 1:18









              hobbshobbs

              151k15 gold badges159 silver badges246 bronze badges




              151k15 gold badges159 silver badges246 bronze badges















              • Hmm, I thought that was handled by app.locals.basedir = '~/Desktop/BitBox/thenewbox'; I tried app.set('home', process.env.HOME || '/Users/Kinnard/Desktop/BitBox/thenewbox'); But that didn't work, same error.

                – Kinnard Hockenhull
                Dec 24 '13 at 1:43












              • Ok, just changing app.locals.basedir = '~/Desktop/BitBox/thenewbox'; to the absolute path worked. Thanks!

                – Kinnard Hockenhull
                Dec 24 '13 at 1:44












              • This got me too :D

                – blong
                Mar 19 '15 at 23:50











              • I'm having this error too. I have no path: ..node_module/rxjs. What am i doing wrong? my issue: ** ./node_modules/rxjs/_esm5/index.js Module build failed: Error: ENOENT: no such file or directory, open '..ClientAppnode_modulesrxjs_esm5index.js'**

                – pnet
                Jul 4 '18 at 18:55











              • You might want to look at this answer: stackoverflow.com/questions/21637099/…

                – BraveNewMath
                Dec 21 '18 at 0:37

















              • Hmm, I thought that was handled by app.locals.basedir = '~/Desktop/BitBox/thenewbox'; I tried app.set('home', process.env.HOME || '/Users/Kinnard/Desktop/BitBox/thenewbox'); But that didn't work, same error.

                – Kinnard Hockenhull
                Dec 24 '13 at 1:43












              • Ok, just changing app.locals.basedir = '~/Desktop/BitBox/thenewbox'; to the absolute path worked. Thanks!

                – Kinnard Hockenhull
                Dec 24 '13 at 1:44












              • This got me too :D

                – blong
                Mar 19 '15 at 23:50











              • I'm having this error too. I have no path: ..node_module/rxjs. What am i doing wrong? my issue: ** ./node_modules/rxjs/_esm5/index.js Module build failed: Error: ENOENT: no such file or directory, open '..ClientAppnode_modulesrxjs_esm5index.js'**

                – pnet
                Jul 4 '18 at 18:55











              • You might want to look at this answer: stackoverflow.com/questions/21637099/…

                – BraveNewMath
                Dec 21 '18 at 0:37
















              Hmm, I thought that was handled by app.locals.basedir = '~/Desktop/BitBox/thenewbox'; I tried app.set('home', process.env.HOME || '/Users/Kinnard/Desktop/BitBox/thenewbox'); But that didn't work, same error.

              – Kinnard Hockenhull
              Dec 24 '13 at 1:43






              Hmm, I thought that was handled by app.locals.basedir = '~/Desktop/BitBox/thenewbox'; I tried app.set('home', process.env.HOME || '/Users/Kinnard/Desktop/BitBox/thenewbox'); But that didn't work, same error.

              – Kinnard Hockenhull
              Dec 24 '13 at 1:43














              Ok, just changing app.locals.basedir = '~/Desktop/BitBox/thenewbox'; to the absolute path worked. Thanks!

              – Kinnard Hockenhull
              Dec 24 '13 at 1:44






              Ok, just changing app.locals.basedir = '~/Desktop/BitBox/thenewbox'; to the absolute path worked. Thanks!

              – Kinnard Hockenhull
              Dec 24 '13 at 1:44














              This got me too :D

              – blong
              Mar 19 '15 at 23:50





              This got me too :D

              – blong
              Mar 19 '15 at 23:50













              I'm having this error too. I have no path: ..node_module/rxjs. What am i doing wrong? my issue: ** ./node_modules/rxjs/_esm5/index.js Module build failed: Error: ENOENT: no such file or directory, open '..ClientAppnode_modulesrxjs_esm5index.js'**

              – pnet
              Jul 4 '18 at 18:55





              I'm having this error too. I have no path: ..node_module/rxjs. What am i doing wrong? my issue: ** ./node_modules/rxjs/_esm5/index.js Module build failed: Error: ENOENT: no such file or directory, open '..ClientAppnode_modulesrxjs_esm5index.js'**

              – pnet
              Jul 4 '18 at 18:55













              You might want to look at this answer: stackoverflow.com/questions/21637099/…

              – BraveNewMath
              Dec 21 '18 at 0:37





              You might want to look at this answer: stackoverflow.com/questions/21637099/…

              – BraveNewMath
              Dec 21 '18 at 0:37













              20














              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) :



              enter image description here



              The fix for me was : npm init --yes



              enter image description here






              share|improve this answer





























                20














                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) :



                enter image description here



                The fix for me was : npm init --yes



                enter image description here






                share|improve this answer



























                  20












                  20








                  20







                  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) :



                  enter image description here



                  The fix for me was : npm init --yes



                  enter image description here






                  share|improve this answer













                  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) :



                  enter image description here



                  The fix for me was : npm init --yes



                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jun 5 '16 at 19:16









                  grepitgrepit

                  10.8k2 gold badges62 silver badges58 bronze badges




                  10.8k2 gold badges62 silver badges58 bronze badges
























                      2














                      I had that issue : use path module



                      const path = require('path');


                      and also do not forget to create the uploads directory first period.






                      share|improve this answer































                        2














                        I had that issue : use path module



                        const path = require('path');


                        and also do not forget to create the uploads directory first period.






                        share|improve this answer





























                          2












                          2








                          2







                          I had that issue : use path module



                          const path = require('path');


                          and also do not forget to create the uploads directory first period.






                          share|improve this answer















                          I had that issue : use path module



                          const path = require('path');


                          and also do not forget to create the uploads directory first period.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited May 13 '18 at 14:34

























                          answered Apr 27 '18 at 16:38









                          SanjaySanjay

                          3934 silver badges17 bronze badges




                          3934 silver badges17 bronze badges
























                              2














                              1. First try npm install ,if the issue is not yet fixed try the following one after the other.


                              2. npm cache clean ,then


                              3. npm install -g npm,then
                                npm install,Finally


                              4. ng serve --o to run the project.
                                Hope this will help....





                              share|improve this answer































                                2














                                1. First try npm install ,if the issue is not yet fixed try the following one after the other.


                                2. npm cache clean ,then


                                3. npm install -g npm,then
                                  npm install,Finally


                                4. ng serve --o to run the project.
                                  Hope this will help....





                                share|improve this answer





























                                  2












                                  2








                                  2







                                  1. First try npm install ,if the issue is not yet fixed try the following one after the other.


                                  2. npm cache clean ,then


                                  3. npm install -g npm,then
                                    npm install,Finally


                                  4. ng serve --o to run the project.
                                    Hope this will help....





                                  share|improve this answer















                                  1. First try npm install ,if the issue is not yet fixed try the following one after the other.


                                  2. npm cache clean ,then


                                  3. npm install -g npm,then
                                    npm install,Finally


                                  4. ng serve --o to run the project.
                                    Hope this will help....






                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited Sep 29 '18 at 8:52

























                                  answered Sep 29 '18 at 8:31









                                  ThisuriThisuri

                                  911 silver badge4 bronze badges




                                  911 silver badge4 bronze badges
























                                      1














                                      __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






                                      share|improve this answer





























                                        1














                                        __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






                                        share|improve this answer



























                                          1












                                          1








                                          1







                                          __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






                                          share|improve this answer













                                          __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







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Dec 21 '18 at 0:38









                                          BraveNewMathBraveNewMath

                                          5,3542 gold badges36 silver badges47 bronze badges




                                          5,3542 gold badges36 silver badges47 bronze badges
























                                              0














                                              For those running Laravel Mix with npm run watch, just terminate the script and run the command again.






                                              share|improve this answer





























                                                0














                                                For those running Laravel Mix with npm run watch, just terminate the script and run the command again.






                                                share|improve this answer



























                                                  0












                                                  0








                                                  0







                                                  For those running Laravel Mix with npm run watch, just terminate the script and run the command again.






                                                  share|improve this answer













                                                  For those running Laravel Mix with npm run watch, just terminate the script and run the command again.







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Oct 1 '18 at 6:40









                                                  Earl LapuraEarl Lapura

                                                  1261 silver badge9 bronze badges




                                                  1261 silver badge9 bronze badges
























                                                      0














                                                      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/





                                                      share|improve this answer





























                                                        0














                                                        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/





                                                        share|improve this answer



























                                                          0












                                                          0








                                                          0







                                                          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/





                                                          share|improve this answer













                                                          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/






                                                          share|improve this answer












                                                          share|improve this answer



                                                          share|improve this answer










                                                          answered May 17 at 16:13









                                                          maxshutymaxshuty

                                                          1,8917 gold badges22 silver badges40 bronze badges




                                                          1,8917 gold badges22 silver badges40 bronze badges


















                                                              protected by eyllanesc Apr 27 '18 at 16:42



                                                              Thank you for your interest in this question.
                                                              Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                              Would you like to answer one of these unanswered questions instead?



                                                              Popular posts from this blog

                                                              Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                                                              Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                                                              Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript