Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot import plugin in another plugin from the same workspace #9637

Closed
Jad31 opened this issue Mar 31, 2022 · 4 comments
Closed

Cannot import plugin in another plugin from the same workspace #9637

Jad31 opened this issue Mar 31, 2022 · 4 comments

Comments

@Jad31
Copy link

Jad31 commented Mar 31, 2022

Current Behavior

I can't import a plugin in another plugin in the same monorepo.

Expected Behavior

I want to import a plugin in another plugin and use it in it in the same monorepo.

Steps to Reproduce

Failure Logs

> yarn run nx generate dist/libs/first-plugin:first-plugin                
yarn run v1.22.11
$ workspace-poc/node_modules/.bin/nx generate dist/libs/first-plugin:first-plugin
Unable to resolve dist/libs/first-plugin:first-plugin.
Cannot find module '@workspace-poc/second-plugin'
Require stack:
- /home/ash/github.com/workspace-poc/dist/libs/first-plugin/src/generators/first-plugin/generator.js
- /home/ash/github.com/workspace-poc/node_modules/nx/src/shared/workspace.js
- /home/ash/github.com/workspace-poc/node_modules/nx/src/cli/init-local.js
- /home/ash/github.com/workspace-poc/node_modules/nx/bin/nx.js
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Environment

> yarn run nx report
yarn run v1.22.11
$ workspace-poc/node_modules/.bin/nx report

 >  NX   Report complete - copy this into the issue template

   Node : 14.19.1
   OS   : linux x64
   yarn : 1.22.11
   
   nx : 13.9.5
   @nrwl/angular : Not Found
   @nrwl/cypress : Not Found
   @nrwl/detox : Not Found
   @nrwl/devkit : 13.9.5
   @nrwl/eslint-plugin-nx : 13.9.5
   @nrwl/express : Not Found
   @nrwl/jest : 13.9.5
   @nrwl/js : 13.9.5
   @nrwl/linter : 13.9.5
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : Not Found
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : 13.9.5
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : Not Found
   @nrwl/web : Not Found
   @nrwl/workspace : 13.9.5
   typescript : 4.5.5
   rxjs : 6.6.7
   ---------------------------------------
   Community plugins:

Done in 0.54s.

Related issues

Notes

@AgentEnder I saw that you worked on this issue #9116 but it seems that it doesnt fix my problem. Have you an idea of what i am doing wrong ?

@AgentEnder
Copy link
Member

Try latest betas and refer to the plugin by it's import path, rather than the dist. This should be fixed, but 13.10s not out yet.

@AgentEnder AgentEnder added blocked: retry with latest Retry with latest release or head. scope: plugins labels Mar 31, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Apr 15, 2022
@Jad31 Jad31 changed the title Cannot import plugin in another plugin from the same worrkspace Cannot import plugin in another plugin from the same workspace Apr 22, 2022
@AgentEnder
Copy link
Member

This has been released in 13.10, and w/ 14 now out I'm going to close the issue out. Please open a new issue if you are still having issues. Thanks!

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants