Hello, I am getting an error when trying to install a WP extension on a Local installation using Terminal.
This is the error I’m receiving:
Usage Error: The nearest package directory (/Users/username/Local Sites/divi-custom-module-development/app/public/wp-content/plugins/new-module) doesn’t seem to be part of the project declared in /Users/username/Local Sites/divi-custom-module-development/app/public/wp-content/plugins.
-
If /Users/username/Local Sites/divi-custom-module-development/app/public/wp-content/plugins isn’t intended to be a project, remove any yarn.lock and/or package.json file there.
-
If /Users/username/Local Sites/divi-custom-module-development/app/public/wp-content/plugins is intended to be a project, it might be that you forgot to list new-module in its workspace configuration.
-
Finally, if /Users/username/Local Sites/divi-custom-module-development/app/public/wp-content/plugins is fine and you intend new-module to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.
I’ve tried copying an empty yarn.lock file into the plugins directory, but that didn’t work. I’m new to this environment, so I have no doubt it’s user error, but nothing I’ve tried based on what I’ve read in help docs and forums has worked.
The package.json and yarn.lock files that were created when I installed the dependencies were places in my user root – /Users/username/
Any assistance would be greatly appreciated! TIA