i want to run the app.js in api with console-ninja in bash cli.but whenever i write
console-ninja node app.js
the problem appears.
i can run the app.js with
node app.js
here is the error message.
node:internal/modules/cjs/loader:1051
throw err;
^
Error: Cannot find module '<REPLACE>'
Require stack:
- internal/preload
at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
at Module._load (node:internal/modules/cjs/loader:901:27)
at internalRequire (node:internal/modules/cjs/loader:166:19)
at Module._preloadModules (node:internal/modules/cjs/loader:1420:5)
at loadPreloadModules (node:internal/process/pre_execution:678:5)
at setupUserModules (node:internal/process/pre_execution:162:3)
at prepareExecution (node:internal/process/pre_execution:124:5)
at prepareMainThreadExecution (node:internal/process/pre_execution:47:3)
at node:internal/main/run_main_module:10:1 {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'internal/preload' ]
}
Node.js v20.6.1
here is my package.json file
{
"name": "api",
"version": "1.0.0",
"description": "",
"main": "app.js",
"type": "module",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.19.2"
}
}
I don’t know what to do I already uninstall and reinstall the npm package and the problem still persists.