Skip to content

experimental-pack-script-packages-in-mirror fails to pack binary targets of sse4_crc32 #5755

@lxe

Description

@lxe

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Some prebuilt packages (sse4_crc32, for example) in offline mirror don't actually contain prebuilt binaries. I'm guessing yarn fails to package built binaries maybe due to the lack of lifecycle scripts or something else entirely.

If the current behavior is a bug, please provide the steps to reproduce.

Steps to reproduce:

  1. Be yarn 1.6.0+
  2. Make a .yarnrc with
yarn-offline-mirror "./npm-packages-offline-cache"
experimental-pack-script-packages-in-mirror true
  1. yarn add '[email protected]'
  2. Observe that it's working:
❯ node -p "require('sse4_crc32')"
{ isHardwareCrcSupported: [Function: isHardwareCrcSupported],
  calculateInSoftware: [Function: swCrc32c],
  calculateOnHardware: [Function: hwCrc32c],
  CRC32: [Function: Crc32C],
  calculate: [Function: hwCrc32c] }
  1. Observe the prebuilt tarball:
❯ ls -l npm-packages-offline-cache/prebuilt/
total 24
-rw-r--r--  1 aleksey  staff  9059 Apr 29 18:44 sse4_crc32-v4.1.1-darwin-x64-57.tgz
  1. Observe that sse4_crc32-v4.1.1-darwin-x64-57.tgz does NOT contain the build target:
tar -xf sse4_crc32-v4.1.1-darwin-x64-57.tgz && find package -name '*.node'
  1. rm -rf node_modules && yarn --offline
  2. node -p "require('sse4_crc32')" now fails:
Error: Could not locate the bindings file. Tried:

What is the expected behavior?

The .node files should be packed and then unpacked in the prebuilt tarballs.

Please mention your node.js, yarn and operating system version.

Node 8.11.1
Darwin
Yarn Master

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions