Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: CLI issue - Node project - Issues with npm when starting

Manse free asked 2 years ago


Expected behavior Expect the application to run succesfully.

Actual behavior Im able to host the application to MDBGO without problems - Im using port 3000 and have a index.js at root. When i look at the logs after im getting a lot of errors (Which i don't get running it manually on my own computer) - Anything im missing here?

Resources (screenshots, code snippets etc.)

Error Log:

npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older                 versions may use Math.random() in certain circumstances, which is known to be     problematic.  See https://v8.dev/blog/math-random for details.
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://oauth2:***@git.mdbootstrap.com/mdb/standard/mdb-ui-kit-pro-essential
npm ERR! enoent 
npm ERR! enoent 
npm ERR! enoent spawn git 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!     /home/node/.npm/_logs/2022-01-11T11_32_41_403Z-debug.log
internal/modules/cjs/loader.js:818
  throw err;
  ^

Error: Cannot find module 'express'
Require stack:
- /home/node/code/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/node/code/index.js:2:17)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/node/code/index.js' ]
}

Package.json

{ 
  "name": "finance-api",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "node index.js",
    "dev": "nodemon index.js -e js,hbs"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "bcryptjs": "^2.4.3",
    "body-parser": "^1.19.1",
    "cookie-parser": "^1.4.6",
    "dotenv": "^10.0.0",
    "express": "^4.17.2",
    "fs": "^0.0.1-security",
    "hbs": "^4.2.0",
    "jsonwebtoken": "^8.5.1",
    "mdb-ui-kit":        "git+https://oauth2:1REMOVED@git.mdbootstrap.com/mdb/standard/mdb-ui-kit-pro-essential",
    "mongoose": "^6.1.4",
    "postman-request": "^2.88.1-postman.30",
    "validator": "^13.7.0"
  }

File Structure:

index.js 
/public 
/src
/templates 
.env
.mdb
package.json

Katarzyna Pietroń staff answered 2 years ago


Sorry for the inconvenience, we have just fixed the bug that affected your project. It is now up and running, you can check its status using the mdb backend info command.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB CLI / MDB GO
  • MDB Version: 3.4.0
  • Device: Mac
  • Browser: Chrome
  • OS: MacOS Montery
  • Provided sample code: No
  • Provided link: No