相关疑难解决方法(0)

使用mongoose时如何清除节点js中的警告

我有疑问

in The Web Developer Bootcamp course from section 29,304 module
(node:15807) Warning: Accessing non-existent property 'count' of module exports inside circular dependency

(Use node --trace-warnings ... to show where the warning was created)

(node:15807) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency

(node:15807) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency

(node:15807) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency
Run Code Online (Sandbox Code Playgroud)

当我使用猫鼬时,我收到了上述警告。如何清除它们?

在此处输入图片说明

mongoose mongodb node.js

22
推荐指数
3
解决办法
3万
查看次数

“data”参数必须是字符串类型或者 Buffer、TypedArray 或 DataView 的实例。收到的类型号 (1505)

我今天刚刚将我的节点版本更新到 v16。现在,当我尝试使用永远来永远运行应用程序时,我收到一个错误,阻止我打开我的应用程序,我在谷歌上努力寻找解决方案,但我可以找到任何东西。有谁有解决办法或知道如何解决它?

(node:1498) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
node:internal/fs/utils:879
  throw new ERR_INVALID_ARG_TYPE(
  ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1505)
    at Object.writeFileSync (node:fs:2146:5)
    at writePid (/usr/lib/node_modules/forever/bin/monitor:13:6)
    at exports.Monitor.<anonymous> (/usr/lib/node_modules/forever/bin/monitor:46:5)
    at exports.Monitor.EventEmitter.emit (/usr/lib/node_modules/forever/node_modules/eventemitter2/lib/eventemitter2.js:339:22)
    at /usr/lib/node_modules/forever/node_modules/forever-monitor/lib/forever-monitor/monitor.js:180:10
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 'ERR_INVALID_ARG_TYPE'
}
Run Code Online (Sandbox Code Playgroud)

node.js forever

6
推荐指数
1
解决办法
4953
查看次数

标签 统计

node.js ×2

forever ×1

mongodb ×1

mongoose ×1