The name redwood doctor
is silly, but it used at many places, so I am using it here to indicate a consistency checker
tool. Here are the needed details
I got in trouble with yarn 3.2, running the yarn rw dev
:
/Users/nik/dev/work/redwood/docs/tandem-tutorial-samples/.pnp.cjs:41326
Error.captureStackTrace(firstError);
^
Error: @redwoodjs/cli tried to access @babel/runtime-corejs3, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: @babel/runtime-corejs3 (via "@babel/runtime-corejs3/core-js/object/define-property")
Required by: @redwoodjs/cli@npm:1.0.0 (via /Users/nik/dev/work/redwood/docs/tandem-tutorial-samples/.yarn/cache/@redwoodjs-cli-npm-1.0.0-953424cca7-6795404bd7.zip/node_modules/@redwoodjs/cli/dist/lib/)
...
Clearly, I managed to invoke Plug’nPlay feature without intending so. Like @dom, I am very much looking forward to be able to used (in other words, I am terrified by the sheer size of node_modules
and seemingly great likelihood of problems it creates), however, I do not want at this time to push boundaries.
Let me finally explain how did I managed to step in that mud: After many years of fighting with git asymmetry (I will explain this in a minute):
-
I always create a new “remote” repository using the browser and provide only the README and license files at that time.
-
Next step is to use git cli in my (local) terminal to clone the “nearly empty” remote remote repository (in a folder having the same name as the remote in Github).
-
As a result, due to using
git clone
my two repos, are properly linked. -
Finally I clone the actual repo - (in this case RW tutorial app) into a temp folder (not willing that the github related files in my local (step 2) folder get overwritten).
At this point I shoot myself in the foot, when copying everything in the temp folder into my local folder. In that process, I lose all the magic files that handle the yarn behavior.
Most likely, the advice I will get is “do not do such merging” without understanding the underlying folder structure. This leads to my question “Is there a need for a redwood doctor?” - utility that will check the consistency of the RWJS app under development.
git asymmetry
git prefers to create a new remote repository using the browser, while the local is easier done with git cli. I tried many times create both from local terminal, and always fought with “does the remote repository needs to exist first or not”. If this needs more explanations, please let me know.