Trouble Installing an Extension Via Terminal

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

Hello @fakeplastic - welcome to the Local community! :wave:

Is there a specific help doc or article you are following? It looks like maybe you’re trying to make a custom Divi module?

Sam

Hi Sam

Thanks for the response. I am going through a custom Divi module creation course from WP Zone and following the installation instructions they provide. I have installed Node.js, Yarn and Gettext successfully, as well as Local. When I try to install the divi-create-extension via Terminal I get the error message I sent in my original email.

It seems the issue is with the Local file/project structure on my computer. The Local files, package.json and yarn.lock, are in my user root. There is also a folder in my user root named “Local Sites” that contains a subfolder with the local wordpress build.

I’m new to Local and the file structures and cannot get a response from support at WP Zone. I’m really hopeful you or someone can help me figure this out.

Thanks!

-a

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.