[bug]: Fails when trying to package binary imports

Open
#64 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 6 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
node.js, typescript

Research direction

Reproduce the failure in a new server-feature plugin using @ngrok/ngrok, then trace the sdk-plugin watch and build entry points and how they invoke pack-up. Compare the behavior with packup.config.js and determine whether configurable bundlers or default .node binary imports is the appropriate scope; done means the package builds and watches successfully with the binary dependency.

Written by the indexing model from the issue text.

Description

issue: bug severity: medium
What version of @strapi/sdk-plugin are you using?

npm: 10.8.3
node: ^20
sdk: 5.2.7
browser: n/a

What's Wrong?

pack-up via sdk-plugin does not support binary imports like the one used in @ngrok/ngrok. 'sdk-pluginprovides no way to add bundlers and negates the ability to usepackup.config.jsby usingdisableConfig: falsewhen calling eitherwatchorbuild`.

To Reproduce
  1. Create a new plugin with server features
  2. Install @ngrok/ngrok which depends on an arch dependent dep with a .node binary
  3. Import this into a server file
  4. Running either watch or build will fail, as the tools only expect plaintext JS
Expected Behaviour

Allow developers to use binaries by either:

  1. Provide the ability to extend pack-up with extra bundlers
  2. Include the ability to import .node binaries by default
Dominant language
TypeScript
Stars
24
Forks
13
Avg merge
5d 3h
Merged PRs (30d)
5

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from strapi/sdk-plugin

All issues in strapi/sdk-plugin

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.