apify-cli icon indicating copy to clipboard operation
apify-cli copied to clipboard

fix: snap-detect-node

Open MQ37 opened this issue 9 months ago • 3 comments

Context:

  • https://github.com/nodejs/node/issues/37982#issuecomment-1248329844
  • https://apify.slack.com/archives/CD0SF6KD4/p1741963523631019

MQ37 avatar Mar 14 '25 15:03 MQ37

First time hearing about "snap" distribution. Why exactly do you need it supported?

I will leave the actual review to @vladfrangu.

Anyway, some tests would be nice, I checked the thread on slack and even there you haven't provided any reproduction of some sort, only a link to a closed node issue.

B4nan avatar Mar 18 '25 10:03 B4nan

First time hearing about "snap" distribution. Why exactly do you need it supported?

I will leave the actual review to @vladfrangu.

Anyway, some tests would be nice, I checked the thread on slack and even there you haven't provided any reproduction of some sort, only a link to a closed node issue.

I would like to support snap since I am using that personally.

Will add tests with snap node distribution. To reproduce just install node with snap (https://snapcraft.io/node) and try to use apify run which will fail without this patch.

MQ37 avatar Mar 18 '25 10:03 MQ37

@B4nan added node version check to test/utils.test.ts, since snap requires systemd which does not run in docker cicd checks with actual snap distribution could not be added. I tested it on my machine which uses the snap and previously apify run failed (it did not detect node) and with this patch installed it works as expected

MQ37 avatar Mar 19 '25 09:03 MQ37

Closing as I personally switched to fnm since there were other issues with the snap version, such as stdio handling, which, for example, breaks MCP stdio servers that rely on this. We can close this as it would cause additional overhead, and the snap distribution should fix this.

MQ37 avatar Apr 07 '25 10:04 MQ37