Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

express - Node JS Error: Cannot find module '[object Object]'

I had my app working a few weeks ago and I was trying to go back into this today to continue adding some features and now I get this error:

node:98290) UnhandledPromiseRejectionWarning: Error: Cannot find module '[object Object]'
Require stack:
- /Users/David/git-repository/shooting.ilogtheoutdoors.com/node_modules/express/lib/view.js
- /Users/David/git-repository/shooting.ilogtheoutdoors.com/node_modules/express/lib/application.js
- /Users/David/git-repository/shooting.ilogtheoutdoors.com/node_modules/express/lib/express.js
- /Users/David/git-repository/shooting.ilogtheoutdoors.com/node_modules/express/index.js
- /Users/David/git-repository/shooting.ilogtheoutdoors.com/src/app.js
- /Users/David/git-repository/shooting.ilogtheoutdoors.com/src/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at new View (/Users/David/git-repository/shooting.ilogtheoutdoors.com/node_modules/express/lib/view.js:81:14)
    at Function.render (/Users/David/git-repository/shooting.ilogtheoutdoors.com/node_modules/express/lib/application.js:570:12)
    at ServerResponse.render (/Users/David/git-repository/shooting.ilogtheoutdoors.com/node_modules/express/lib/response.js:1012:7)
    at /Users/David/git-repository/shooting.ilogtheoutdoors.com/src/routes/setup.js:37:18
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:98290) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:98290) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I have tried to reinstall node_modules, node, npm, express etc. But I still get this same error? How do I solve this issue?

question from:https://stackoverflow.com/questions/65859874/node-js-error-cannot-find-module-object-object

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...