1
(node:6852) [LRU_CACHE_OPTION_maxAge] DeprecationWarning: The maxAge option is deprecated. please use options.ttl instead
(Use `node --trace-deprecation ...` to show where the warning was created)

> mynodejsapp@0.0.0 start
> node ./bin/www

npm ERR! code ENOENT
npm ERR! syscall spawn C:\Windows\system32\cmd.exe;C:\MinGW\bin
npm ERR! path C:\Users\TECHNOCITY9645075247\Desktop\web designing\myNodejsApp
npm ERR! errno -4058
npm ERR! enoent spawn C:\Windows\system32\cmd.exe;C:\MinGW\bin ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\TECHNOCITY9645075247\AppData\Local\npm-cache\_logs\2022-03-13T10_44_05_635Z-debug-0.logenter code here

this is the error showing in the terminal my node and npm versions are upto date

  • Please, post more information like what kind of apps are you trying to start, node version, npm version, the completed output log and etc.... – Mohamed El-Refaie Mar 13 '22 at 19:54
  • node version is 16.14.0 , npm version 8.3.1.I just started learning nodejs. – Muhmd Ajeer Mar 15 '22 at 17:16
  • npm ERR! code ENOENT npm ERR! syscall spawn C:\Windows\system32\cmd.exe;C:\MinGW\bin npm ERR! path C:\Users\TECHNOCITY9645075247\Desktop\Web Development npm ERR! errno -4058 npm ERR! enoent spawn C:\Windows\system32\cmd.exe;C:\MinGW\bin ENOENT npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\TECHNOCITY9645075247\AppData\Local\npm-cache\_logs\2022-03-15T17_17_16_517Z-debug-0.log this is the error i get when running the app – Muhmd Ajeer Mar 15 '22 at 17:19

4 Answers4

2

Try to reinstall Node.js. Should work as it worked for me.

Uninstalling the Node.js

  1. Clear the npm cache by running the following command in your terminal.

    npm cache clean --force

  2. Go to the windows control panel and click on Uninstall a program, select Node.js and click on uninstall tab to uninstall the node and npm successfully.

Restart your system.

  1. Verify if node.js and npm are completely uninstalled from your system using:

    node -v

If the above command prints command not found then you’re successfully uninstalled, otherwise look into the below directories and remove the contents manually.

C:\Program Files (x86)\Nodejs
C:\Program Files\Nodejs
C:\Users\{User}\AppData\Roaming\npm (or %appdata%\npm)
C:\Users\{User}\AppData\Roaming\npm-cache (or %appdata%\npm-cache)
0

Looks you're facing the problem of using maxAge instead of expires look at this link Can't set cookie 'expires' or 'maxAge' in Node.js using Express 3.0

Maybe help you for better resolution into the issue.

Nafis
  • 1,020
  • 17
  • 36
0

Try to reinstall Node.js. Should work as it worked for me.

kicehyfe
  • 11
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 26 '22 at 19:27
  • Tried,not working for me – Muhmd Ajeer Apr 09 '22 at 08:39
0

Try to clean your cache then reinstall Node.js. Should work as it worked for me.