Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings like (node:6980) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency #50

Open
elcreator opened this issue Jan 13, 2021 · 3 comments

Comments

@elcreator
Copy link

~# node -v
v14.15.4

I have Zabbix 5.0.4. Can't use pm2-zabbix due to the next problem:

~# pm2-zabbix --discover

(node:6980) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:6980) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:6980) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
...

[KM] Connecting
internal/fs/utils.js:779
  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 (6999)
    at Object.writeFileSync (fs.js:1460:5)
    at daemonize (/usr/local/lib/node_modules/pm2-zabbix/node_modules/pm2/lib/Interactor/InteractorDaemonizer.js:237:6)
    at /usr/local/lib/node_modules/pm2-zabbix/node_modules/pm2/lib/Interactor/InteractorDaemonizer.js:186:7
    at ReqSocket.<anonymous> (/usr/local/lib/node_modules/pm2-zabbix/node_modules/pm2/lib/Interactor/InteractorDaemonizer.js:41:12)
    at Object.onceWrapper (events.js:421:28)
    at ReqSocket.emit (events.js:315:20)
    at Timeout._onTimeout (/usr/local/lib/node_modules/pm2-zabbix/node_modules/pm2-axon/lib/sockets/sock.js:278:12)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7) {
  code: 'ERR_INVALID_ARG_TYPE'
}
@elcreator
Copy link
Author

NODE_OPTIONS="--trace-warnings" pm2-zabbix --discover
(node:9350) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
    at Object.get (internal/modules/cjs/loader.js:664:5)
    at Object._register [as register] (/root/.nvm/versions/node/v14.15.4/lib/node_modules/pm2-zabbix/node_modules/shelljs/src/common.js:455:12)
    at Object.<anonymous> (/root/.nvm/versions/node/v14.15.4/lib/node_modules/pm2-zabbix/node_modules/shelljs/src/cat.js:4:8)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)

@cuttep
Copy link

cuttep commented Mar 10, 2021

pm2-zabbix/node_modules/shelljs/src/common.js
455 line
// if (shell[name] && !wrapOptions.overWrite) {
// throw new Error('unable to overwrite ' + name + ' command');
// }

@elcreator
Copy link
Author

I have single file .nvm/versions/node/v14.15.4/bin/pm2-zabbix without node_modules in the same directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants