I am trying to understand some of the details of the developer setup.
When you run yarn, do you run it out of the root “/suitecrm/” folder, the “suitecrm/public/” folder, or the “/suitecrm/public/legacy/” folder? I am assuming the root folder “/suitecrm/” since that is where I see the package.json however I want to ask to make sure.
When yarn creates the “dist” folder is this new folder supposed to replace /suitecrm/public/dist folder or does it continue to reside in the “/suitecrm/dist/” folder?
You should run yarn from the root directory of the SuiteCRM project, which is typically the /suitecrm/ folder. This is where the package.json file is located. Running yarn in this directory ensures that the dependencies specified in package.json are installed correctly.
Ok great that is what I thought but I wanted to make sure.
Do you know if the dist folder it generates is supposed to stay in the root folder or is it supposed to replace the one in the public folder?
The dist folder created by yarn will be generated in the root directory /suitecrm/, not in the public directory. Specifically:
/suitecrm/dist/: This is where the output of the build process will reside, containing the bundled and minified files ready for deployment.
It does not replace or directly interact with the /suitecrm/public/dist/ folder. Instead, the contents of /suitecrm/dist/ are typically intended to be used for deployment, while /suitecrm/public/dist/ might be used for other purposes, such as static assets during development or serving specific needs of the public-facing interface.
I am currently troubleshooting the yarn build failing on core with the “Maximum call stack size exceeded” and these were just questions that came up that I couldn’t find any direct answers for.
That is very helpful.
However, I haven’t created any custom code yet. Outside of a 3rd party SMS module we just installed to try out it is pretty much a standard install of v8.3.0. It was its instructions to install the front-end developer options, node, yarn, and angular/cli, as part of its setup that had me run into this problem in the first place, making me think it may be an issue with their code. I will be removing their module and trying the process again. Then if that doesn’t work I will be planning an upgrade to the current head version of suitecrm. However, I will be setting up a separate install on a local VM for development so that I can begin to do development.
@JosephN true, they explicitly tell you to install yarn and rebuild the angular files. So I guess there is no way around it.
(Though I think the idea behind the way extensions are setup with angular federation and all that, is to avoid the need to have to build the extension)