S-IAF
Join ServerSapphire - Imagine a framework
sapphire-support
Registering commands and other paths
SStev2/16/2023
Hi guys! I'm having some troubles.
When I use
However, if I do not use
Why does this happen? I've tried using
I cannot see anywhere in the working project, using
Thanks!
When I use
sapphire new
, everything works as intended. The commands in the commands
directory are registered properly.However, if I do not use
sapphire new
and try to add it to an existing project, without sapphire init
, it doesn't register the commands. After looking into it, and logging the stores, I see that the paths should be C:/.../myProject/bin/commands
, but the path is showing C:/.../myProject/commands
. Even if I copy the .sapphirerc.json
from the other working one.Why does this happen? I've tried using
sapphire init
with the same problem - it looks a directory up.I cannot see anywhere in the working project, using
sapphire new
, where any additional configuration is added.Thanks!
AOAnswer Overflow2/16/2023
Solution
FFavna2/16/2023
Topmost big red block: https://www.sapphirejs.dev/docs/Guide/getting-started/getting-started-with-sapphire
Configure the main property in your package.json correctly
Configure the main property in your package.json correctly
SStev2/16/2023
That was it! Thank you!
AOAnswer Overflow2/16/2023