mattpker / pm2-slack

A PM2 module to emit events to Slack
MIT License
145 stars 70 forks source link

Warning fsevents@1.1.2: The platform "linux" is incompatible with this module #18

Closed thim81 closed 6 years ago

thim81 commented 7 years ago

Hi Matt,

Since the latest install, we get this strange warning and error.

We are using Yarn to install all our packages. But it seems to be related to something in the pm2-slack module.

StdOut:
[PM2][Module] Installing module pm2-slack
[PM2][Module] Module already installed. Updating.
[PM2] Applying action deleteProcessId on app [0](ids: 0)
[PM2] [pm2-slack](0) ✓
In memory process deleted
[PM2][Module] Calling [YARN] to install pm2-slack ...
yarn add v0.24.5
[1/4] Resolving packages...
[2/4] Fetching packages...
info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved 1 new dependency.
└─ pm2-slack@0.3.4
Done in 1.02s.
[PM2][Module] Module downloaded
[PM2][WARN] Applications index not running, starting...
[PM2] App [pm2-slack] launched (1 instances)
== pm2-slack ==
StdErr:
warning No license field
warning fsevents@1.1.2: The platform "linux" is incompatible with this module.
warning No license field
/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:130
    return typeof obj == 'object' && obj.width != undefined
                                        ^

TypeError: Cannot read property 'width' of null
    at get_width (/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:130:41)
    at /usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:125:68
    at Array.forEach (native)
    at extractColumnWidths (/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:124:9)
    at /usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:98:11
    at Array.forEach (native)
    at Table.toString (/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:95:16)
    at /usr/lib/node_modules/pm2/lib/API/CliUx.js:329:29
    at Array.forEach (native)
    at Object.UX.dispKeys (/usr/lib/node_modules/pm2/lib/API/CliUx.js:310:19)
mattpker commented 7 years ago

Try installing it with NPM. Looks like yarn is not installing fsevents correctly or something. Let me know if it works with NPM. I may need to investigate yarn compatibility.

On Jun 27, 2017, at 7:14 AM, thim81 notifications@github.com wrote:

Hi Matt,

Since the latest install, we get this strange warning and error.

We are using Yarn to install all our packages. But it seems to be related to something in the pm2-slack module.

StdOut: [PM2][Module] Installing module pm2-slack [PM2][Module] Module already installed. Updating. [PM2] Applying action deleteProcessId on app [0](ids: 0) [PM2] pm2-slack ✓ In memory process deleted [PM2][Module] Calling [YARN] to install pm2-slack ... yarn add v0.24.5 [1/4] Resolving packages... [2/4] Fetching packages... info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... success Saved 1 new dependency. └─ pm2-slack@0.3.4 Done in 1.02s. [PM2][Module] Module downloaded [PM2][WARN] Applications index not running, starting... [PM2] App [pm2-slack] launched (1 instances) == pm2-slack ==

StdErr: warning No license field warning fsevents@1.1.2: The platform "linux" is incompatible with this module. warning No license field /usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:130 return typeof obj == 'object' && obj.width != undefined ^

TypeError: Cannot read property 'width' of null at get_width (/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:130:41) at /usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:125:68 at Array.forEach (native) at extractColumnWidths (/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:124:9) at /usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:98:11 at Array.forEach (native) at Table.toString (/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:95:16) at /usr/lib/node_modules/pm2/lib/API/CliUx.js:329:29 at Array.forEach (native) at Object.UX.dispKeys (/usr/lib/node_modules/pm2/lib/API/CliUx.js:310:19) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

thim81 commented 7 years ago

Hi Matt,

The strange thing is that we install the pm2-slack module via the following command:

pm2 install pm2-slack

and pm2 get installed via NPM

npm install pm2@latest -g

So I don't understand why it gets installed via Yarn instead of NPM.

mattpker commented 6 years ago

pm2 probably sees that yarn is installed and default's to it? I have not had any other reports of this issue so I am closing.