Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k 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 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...