node-mac icon indicating copy to clipboard operation
node-mac copied to clipboard

Example code not working on latest macOS

Open ShivamJoker opened this issue 4 years ago • 4 comments

The terminal says

Installation Complete
---------------------
Hello World started!
Visit http://127.0.0.1:3000 to see it in action.

But I couldn't find anything in the activity monitor also, I am just running the example code and there is no log in the ~/Library/Logs and plist in ~/Library/LaunchAgents

When I run hello world with node the server works.

here is the screenshot image

ShivamJoker avatar Jun 03 '20 14:06 ShivamJoker

Fixed this in v1.0.0.

There were a number of things happening, including outdated plist data (which is used to populate the activity monitor). However; the activity monitor may or may not display the name of the process (it may just display node) depending on the version of Node you're running. There is an upstream issue at https://github.com/nodejs/node/issues/28945 causing this in various versions.

Using Node 13.5.0, the results look like this:

catalina logs

Running Node 14.0.0+ (affected by the upstream error):

image

This library can't do anything about the naming issues since it's a problem in Node core. However; the daemons will still run and output logs normally.

coreybutler avatar Jul 09 '20 04:07 coreybutler

It is still crashing while running hello world this is in the log

# Hello World Errorsinternal/fs/utils.js:230
    throw err;
    ^

Error: EPERM: operation not permitted, open '/Users/shivam/Documents/web/gitclones/node-mac/lib/wrapper.js'
    at Object.openSync (fs.js:458:3)
    at Object.readFileSync (fs.js:360:35)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:22)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  errno: -1,
  syscall: 'open',
  code: 'EPERM',
  path: '/Users/shivam/Documents/web/gitclones/node-mac/lib/wrapper.js'
}

And yes I tried uninstalling and installing and also doing chmod 777 to the lib image

ShivamJoker avatar Jul 09 '20 05:07 ShivamJoker

Authentication Errorsnode:internal/fs/utils:344

throw err;
^

Error: EPERM: operation not permitted, open '/Users/dhananjay/Desktop/Projects/user-authentication-module/backend-app/node_modules/node-mac/lib/wrapper.js' at Object.openSync (node:fs:585:3) at Object.readFileSync (node:fs:453:35) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1114:18) at Module.load (node:internal/modules/cjs/loader:975:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47 { errno: -1, syscall: 'open', code: 'EPERM', path: '/Users/dhananjay/Desktop/Projects/user-authentication-module/backend-app/node_modules/node-mac/lib/wrapper.js' }

Node.js v17.3.1

Facing Above issue @ShivamJoker Have you found any solution?

dhananjaysharma-me avatar Jun 27 '23 15:06 dhananjaysharma-me

having same problem too

sangyookm avatar Feb 23 '24 14:02 sangyookm