As I work on my MainProject
, I'm attempting to set up a local version of the ckeditor-5 plugin PeteCkPlugin
that was generated using the ckeditor5 package generator.
I experimented with using yarn link
within the local directory of PeteCkPlugin
, followed by
yarn link @PeteSpace/PeteCkPlugin
in the root directory of MainProject
. However, this resulted in a Usage Error: Invalid destination '@PeteSpace/PeteCkPlugin'; Can't link the project to itself
message.
Another approach I tried was utilizing the yarn package.json
resolutions field:
{
...,
"resolutions": {
"@PeteSpace/PeteCkPlugin": "link:/path/to/project/PeteSpace/PeteCkPlugin"
},
...
}
This method successfully installed the package. However, MainProject
encountered a failure with an
"Uncaught CKEditorError: ckeditor-duplicated-modules. Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-ckeditor-duplicated-modules"
error. This issue seemed to stem from the local PeteCkPlugin
package utilizing its own PeteCkPackage/node_modules/ckeditor package
instead of the shared MainProject/node_modules/ckeditor package
.
I experimented with replacing link:
with portal:
within the resolutions value as well...
Since the package is private and I am not yet part of the correct npm organization, I am unable to publish it. Any suggestions or insights on symlink behavior and the interactions between yarn and npm would be greatly appreciated as I navigate this process.