Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Fix warnings when packaging with leveldown. #1273

Closed
wants to merge 1 commit into from

Conversation

tegefaulkes
Copy link

Fixes #1264.
Relates to #837

The goal of this PR is to remove warnings when packaging a project that includes the leveldown native module.
This change should;

  • Remove warnings when packaging leveldown.
  • packaged executable should run without needing to include the leveldown prebuilds directory with the executable.

Removes dictionary override for bundling leveldown. changes from PR vercel#837 makes this unnecessary now.
@CMCDragonkai
Copy link

This is pretty quick fix. Can it be merged soon?

@dsturnbull
Copy link

Resolvable in local config, e.g. package.json in the thing you're packaging up:

    "patches": {
      "node_modules/leveldown/binding.js": []
    }

This essentially removes the patch specified in dictionary/leveldown.js while we wait for this PR.

@robertsLando
Copy link
Contributor

This can be handeld now using --no-dict option

@CMCDragonkai
Copy link

What is the leveldown.js dictionary used for anyway? Why is it there if packaging native leveldown results in a warning? Why not just remove that dictionary entirely for leveldown?

@CMCDragonkai
Copy link

@robertsLando Changing to use --no-dict leveldown option did not work in our case. It resulted in: > Error! Not more than one entry file/directory is expected. Nothing else changed.

We're using something like:

        pkg . \
          --targets node${utils.nodeVersion}-linux-${arch} \
          --no-bytecode \
          --public \
          --public-packages "*" \
          --no-dict leveldown \
          --output out

@CMCDragonkai
Copy link

It required leveldown.js.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warnings when bundling leveldown.
4 participants