question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

relative plugins from external config shared across packages breaks

See original GitHub issue

Describe the bug

When you make an external config of auto to be shared across multiple packages and specify a plugin that is relative path, the plugin is not found.

To Reproduce

  1. make a repository to house auto’s config
  2. make a custom plugin and define it relative in package.json
"auto": {
  "plugins": [
    "./plugins/some-plugin.js",
  ]
}
  1. publish this to an npm registry
  2. in another initialized npm project, install the auto config repo and extend the config:
"auto": {
  "extends": "@SCOPE",
}
  1. do a dry-run release of the project npx auto shipit --dry-run
  2. get below error:
⚠  warning   Could not find plugin from path: $PROJECT/plugins/some-plugin.js

Expected behavior

When using auto.extend, the relative path-ed plugins from the configuration should be relative to itself and not the project that the auto config is installed into and extended in.

Additional context

I think a viable solution is to publish the plugins to npm, but that requires setting it up the auto config project to be a monorepo, and alias-ing the plugins so I can use itself to release itself.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
hipstersmoothiecommented, Jan 14, 2021

Could you test out the canary version in #1717? @sethomas

1reaction
hipstersmoothiecommented, Jan 14, 2021

This is a cool use of a shared config. gonna make this work!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with dependant module resolution if the path is relative
So i managed to work around the issue by changing to using a symlink and that works fine. I honestly think this would...
Read more >
Share Compose configurations between files and projects
If a service is defined in both files, Compose merges the configurations using the rules described in Adding and overriding configuration. To use...
Read more >
Plugins - Parcel
This lets you configure Parcel's behavior by file extension, file path, or even a specific file name. Globs are matched relative to the...
Read more >
Relative imports in Python 3 - Stack Overflow
Solution #4: Use absolute imports and some boilerplate code · Add the parent directory of package to sys.path before attempting to import ...
Read more >
Config Plugins - Expo Documentation
Expo config plugins mostly come from Node modules, you can install them just like other packages in your project. For instance, expo-camera has...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found