JS Hooks not working on M1 Mac #4834
-
I am using the prebuilt version of the Pocketbase 0.22.10. When running on mac (for development) no JS hook works or are executed. If you edit one, you can see Pocketbase restart due to detecting the file change. However, it doesn't work. This simple hook should print to stdout onAfterBootstrap((e) => {
console.log('Hello World');
}); But it does not. If it try this on a laptop running windows it works fine. So I am unsure if its a arm issue or a mac issue. Any help would be great. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't have access to a mac to verify it but I don't think your issue is PocketBase related as the above code doesn't have anything platform specific - it just prints to the Double check that your binary actually works with the To explicitly specify a hook directory you can try running: # use "./pocketbase serve --help" to list all flags
./pocketbase serve --hooksDir='/path/to/your/pb_hooks' |
Beta Was this translation helpful? Give feedback.
I don't have access to a mac to verify it but I don't think your issue is PocketBase related as the above code doesn't have anything platform specific - it just prints to the
stdout
.Double check that your binary actually works with the
pb_hooks
directory that you are updating and that your hook file ends with.pb.js
(I suspect the latter).To explicitly specify a hook directory you can try running: