Nodejs Error: ENOENT: no such file or directory

This tutorial guides you on how to prepare Nodejs Fault: ENOENT: no such file or directory while running your node project or any application which contains Nodejs component.

Prepare Nodejs Error: ENOENT: no such file or directory

Nodejs Error: ENOENT: no such file or directory

When I tried to download guacamole-customer whose frontend is adult using Nodejs, and I tried to setup installing guacamole natively on Windows machine.

After downloading the lawmaking, I was trying to build guacamole-client which includes Nodejs frontend component past running "mvn package" command as shown beneath. But it resulted with error " Mistake: ENOENT: no such file or directory, open 'C:\Users\Documents\Work\guacamole-client-chief\guacamole\src\chief\frontend\dist\npm-dependencies.txt' "

> mvn packet --- --- [INFO] <i> [dependency-list-plugin] Skipping file dependency "src\app\textInput\directives\guacKey.js" (no NPM packet) [INFO] <i> [dependency-list-plugin] Skipping file dependency "src\app\textInput\directives\guacTextInput.js" (no NPM bundle) [INFO] <i> [dependency-list-plugin] Skipping file dependency "src\app\textInput\styles\textInput.css" (no NPM packet) [INFO] <i> [dependency-list-plugin] Skipping file dependency "src\app\textInput\textInputModule.js" (no NPM package) [INFO] <i> [dependency-list-plugin] Skipping file dependency "src\app\bear on\directives\guacTouchDrag.js" (no NPM bundle) [INFO] <i> [dependency-list-plugin] Skipping file dependency "src\app\bear upon\directives\guacTouchPinch.js" (no NPM package) [INFO] <i> [dependency-list-plugin] Skipping file dependency "src\app\touch\touchModule.js" (no NPM packet) [INFO] <i> [dependency-listing-plugin] Skipping file dependency "src\index.html" (no NPM bundle) [INFO] <i> [dependency-list-plugin] Skipping file dependency "src\relocateParameters.js" (no NPM package) [INFO] [webpack-cli] Error: ENOENT: no such file or directory, open 'C:\Users\Documents\Work\guacamole-customer-primary\guacamole\src\main\frontend\dist\npm-dependencies.txt' [INFO]     at Object.openSync (fs.js:476:3) [INFO]     at Object.writeFileSync (fs.js:1467:35) ---- [INFO]     at AsyncSeriesHook.lazyCompileHook (C:\Users\Documents\Piece of work\guacamole-client-master\guacamole\src\main\frontend\node_modules\tapable\lib\Hook.js:154:20) [INFO]     at C:\Users\Documents\Work\guacamole-client-master\guacamole\src\main\frontend\node_modules\webpack\lib\Compilation.js:1414:32 { [INFO]   errno: -4058, [INFO]   syscall: 'open', [INFO]   code: 'ENOENT', [INFO]   path: 'C:\\Users\\Documents\\Work\\guacamole-client-chief\\guacamole\\src\\main\\frontend\\dist\\npm-dependencies.txt' [INFO] } [INFO] npm ERR! code ELIFECYCLE [INFO] npm ERR! errno two [INFO] npm ERR! @ build: `webpack --progress` [INFO] npm ERR! Exit status 2 [INFO] npm ERR! [INFO] npm ERR! Failed at the @ build script. [INFO] npm ERR! This is probably not a trouble with npm. There is likely additional logging output above. [INFO] [INFO] npm ERR! A complete log of this run tin can be found in: [INFO] npm ERR!     C:\Users\AppData\Roaming\npm-cache\_logs21-07-28T14_42_52_884Z-debug.log

The above control " mvn bundle " is supposed to invoke maven to automatically build and packet all the components, producing a single .war file. And while building frontend Nodejs component, it was looking for a file chosen " npm-depedencies.txt " just that file is missing.

Solution

As you can see from the above error, that it is expecting file called "npm-dependencies.txt" to exist there in specific path. But it does non exist.

lawmaking: 'ENOENT',  path: 'C:\\Users\\Documents\\Work\\guacamole-client-master\\guacamole\\src\\main\\frontend\\dist\\npm-dependencies.txt'

ENOENT means Error NO ENTry (or Fault NO ENTity) or but you can say that there is NO such directory ENTry.

Therefore, you lot either need to create the expected file in the specific path i.e., under dist directory or else reconfigure your application so that it volition betoken to the correct directory path for the required file.

Later fixing, attempt edifice your application again. The Nodejs Fault: ENOENT: no such file or directory should have gone abroad now.

Hope information technology helped 🙂

Also see:

  • Call ngOnInit() again from another part – Angular nine ?
  • ngOnChanges become new value and previous value – Athwart
  • Global Angular CLI version is greater than your local version
  • Upgrade Angular CLI to the latest version Angular nine or 10 ?
  • How to use new static selection in ViewChild Angular ix ?
  • Project contents into angular components using ng-content
  • Call ngOnInit() again from another function – Athwart ix ?
  • ngAfterContentInit with Example – Angular
  • make npm install control to work behind proxy ?
  • Node Sass could not find a binding for your current environs
  • ngOnDestroy Example Angular
  • Angular Component : In which lifecycle hook y'all can cheque value of DOM element ?
  • @ContentChild TypeError: Cannot read property 'nativeElement' of undefined
  • Access ng-content with @ContentChild – Angular Component
  • How to select an chemical element in a component template – Angular ?
  • Difference betwixt @ViewChild and @ContentChild – Angular Example
  • Expected 0 type arguments, only got 1 : Angular
  • Angular – Admission template reference variables from component course ?
  • Pass variable from parent to custom child component – Athwart nine
  • Uninstall Nodejs completely from Mac OSX ?
  • EventEmitter parameter value undefined for listener
  • Typescript Error: Property does not exist on value of type
  • Remove http and https proxy settings of npm and git ?
  • How to change node version using nvm ?

References:

  • github nvm
  • nodejs docs