DragonFlyBSD / DPorts

The dedicated application build system for DragonFly BSD
Other
89 stars 46 forks source link

www/npm and www/node10 can not install package through npm install #211

Closed lhmwzy closed 2 years ago

lhmwzy commented 4 years ago

uname -a: DragonFly 5.6-RELEASE DragonFly v5.6.2.4.g39d387-RELEASE #1: Sun Sep 22 20:19:17 CST 2019 /usr/obj/usr/src/sys/lhmwzy x86_64

cat /etc/make.conf:

git_UNSET=CONTRIB PERL DIALOG
#MASTER_SITE_OVERRIDE?=http://ports.hshh.org/${DIST_SUBDIR}/
MASTER_SITE_OVERRIDE?=http://mirrors.163.com/freebsd-ports/distfiles/${DIST_SUBDIR}/
#FETCH_CMD=axel -a -n 3 
MODULES_WITH_WORLD=true
MODULES_OVERRIDE=dev/acpica bus/u4b/controller/ehci dev/disk/vn bus/u4b/controller/xhci net/zlib
#DEFAULT_VERSIONS+=ssl=openssl
OPTIONS_DEFAULT=RESSL

#DEFAULT_VERSIONS+=perl5=5.26

cat /usr/src/sys/config/lhmwzy:

#
# X86_64_GENERIC -- Generic kernel configuration file for DragonFly/x86_64
#
# Check the LINT64 configuration file in sys/config, for an
# exhaustive list of options.

platform        pc64
machine         x86_64
machine_arch    x86_64
cpu             HAMMER_CPU
ident           LHMWZY
maxusers        0
#options        CPU_DISABLE_AVX

options         INET                    #InterNETworking
options         HAMMER                  #Hammer Filesystem
options         HAMMER2                 #HAMMER2 filesystem
options         NULLFS                  #NULL filesystem
options         FFS                     #Berkeley Fast Filesystem
options         SOFTUPDATES             #Enable FFS soft updates support
options         UFS_DIRHASH             #Improve performance on big directories
options         MFS                     #Memory Filesystem
options         TMPFS                   #Temporary Filesystem
options         MD_ROOT                 #MD is a potential root device
#options        NFS                     #Network Filesystem
#options        NFS_ROOT                #NFS usable as root device, NFS required
#options        MSDOSFS                 #MSDOS Filesystem
#options        CD9660                  #ISO 9660 Filesystem
options         PROCFS                  #Process filesystem
options         SCSI_DELAY=5000         #Delay (in ms) before probing SCSI
options         IFPOLL_ENABLE           # Support mixed interrupt-polling
                                        # handling of network device drivers
options         UCONSOLE                #Allow users to grab the console
options         KTRACE                  #ktrace(1) support
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev

# ALTQ
options         ALTQ            #alternate queueing
options         ALTQ_CBQ        #class based queueing
options         ALTQ_RED        #random early detection
options         ALTQ_RIO        #triple red for diffserv (needs RED)
options         ALTQ_HFSC       #hierarchical fair service curve
options         ALTQ_PRIQ       #priority queue
options         ALTQ_FAIRQ      #fair queueing
#options        ALTQ_NOPCC      #don't use processor cycle counter
#options        ALTQ_DEBUG      #for debugging

# Debugging for Development
options         DDB
options         DDB_TRACE
options         INVARIANTS

device          isa
device          acpi
device          pci

# AHCI driver, this will override NATA for AHCI devices,
# both drivers may be included.
#
device          ahci

# NVME driver, direct PCIe-attached SSD cards
#
#device         nvme

# SiI3124/3132 driver
#
#device         sili

# NEW-ATA (NATA) and ATAPI devices
#
device          nata
device          natadisk                # ATA disk drives
#device         natapicd                # ATAPI CDROM drives
#device         natapifd                # ATAPI floppy drives
#device         natapist                # ATAPI tape drives
#device         natapicam               # Emulate ATAPI devices as SCSI
#device         nataraid                # support for ATA software RAID
                                        # controllers
options         ATA_STATIC_ID           # Static device numbering

# SCSI Controllers
#device         amd             # AMD 53C974 (Tekram DC-390(T))
#device         isp             # Qlogic family
#device         ispfw           # Firmware for QLogic HBAs- normally a module
device          mpt             # LSI-Logic MPT/Fusion
device          mps             # LSI-Logic MPT-Fusion 2
#device         ncr             # NCR/Symbios Logic
#device         sym             # NCR/Symbios Logic (newer chipsets)
#options        SYM_SETUP_LP_PROBE_MAP=0x40
                                # Allow ncr to attach legacy NCR devices when
                                # both sym and ncr are configured

#device         adv0    at isa?
#device         adw
#device         bt

# SCSI peripherals
device          scbus           # SCSI bus (required)
device          da              # Direct Access (disks)
device          sa              # Sequential Access (tape etc)
#device         cd              # CD
device          pass            # Passthrough device (direct SCSI access)
#device         sg              # Passthrough device (linux scsi generic)

# VirtIO support
#device         virtio          # VirtIO core
#device         virtio_blk      # VirtIO disk driver
#device         virtio_scsi     # VirtIO SCSI driver
#device         vtnet           # VirtIO network driver

# VMware support
device          vmx             # VMware VMXNET3 Ethernet

# atkbdc0 controls both the keyboard and the PS/2 mouse
device          atkbdc0 at isa? port IO_KBD
device          atkbd0  at atkbdc? irq 1
device          psm0    at atkbdc? irq 12

device          vga0    at isa?

# kbdmux is the keyboard multiplexer
device          kbdmux

# splash screen/screen saver
pseudo-device   splash

# syscons is the default console driver, resembling an SCO console
# only one syscons with efi framebuffer flag (0x400) allowed
device          sc0     at nexus? flags 0x500
options         SC_PIXEL_MODE           # add support for the raster text mode
options         SC_DFLT_FONT
makeoptions     SC_DFLT_FONT=cp437

#device         agp             # support several AGP chipsets

# Intel performance-energy bias
#device         perfbias
# Intel software controlled clock modulation
#device         clockmod

# HW monitoring devices
#device         aps0    at isa? port 0x1600
#device         lm0     at isa? port 0x290
#device         it0     at isa? port 0x290
#device         it1     at isa? port 0xc00
#device         it2     at isa? port 0xd00
#device         it3     at isa? port 0x228
#device         wbsio0  at isa? port 0x2e
#device         wbsio1  at isa? port 0x4e
# Intel Core and newer CPUs on-die digital thermal sensor support
#device         coretemp
#device         dimm            # DIMM information (location, etc.)
#device         coremctl        # support Intel Core and E3 memory controller
#device         ecc             # support AMD8000, Intel E3 and Intel E5 ECC
                                # requires coremctl and dimm.
#device         memtemp         # support Intel Core, E3 and E5 memory thermal
                                # sensor.
                                # requires coremctl and dimm.

# PCCARD (PCMCIA) support
#device         pccard
#device         cardbus
#device         cbb

# Serial (COM) ports
#device         sio0    at isa? port IO_COM1 flags 0x10 irq 4
#device         sio1    at isa? port IO_COM2 irq 3
#device         sio2    at isa? disable port IO_COM3 irq 5
#device         sio3    at isa? disable port IO_COM4 irq 9

# PCI Ethernet NICs.

device          em              # Intel PRO/1000 adapter Gigabit Ethernet Card (``Wiseman'')
                                # Requires ig_hal
device          igb             # Intel Pro/1000 (82575, 82576, 82580, i350)
                                # Requires ig_hal
device          ig_hal          # Intel PRO/1000 hardware abstraction layer

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device          miibus          # MII bus support

# Pseudo devices - the number indicates how many units to allocate.
pseudo-device   loop            # Network loopback
pseudo-device   ether           # Ethernet support
pseudo-device   tun             # Packet tunnel.
pseudo-device   pty             # Pseudo-ttys (telnet etc)
pseudo-device   md              # Memory "disks"
#pseudo-device  vn              # File image "disks"
#pseudo-device  gif             # IPv6 and IPv4 tunneling
pseudo-device   lagg
pseudo-device   snp             # Snoop device - to look at pty/vty/etc..
# CARP support
#options                CARP
#pseudo-device  carp

# The `bpf' pseudo-device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
pseudo-device   bpf             #Berkeley packet filter

#device         crypto          # core crypto support, used by wlan
#device         cryptodev       # /dev/crypto for access to h/w

# USB support
#
device          usb             # USB Bus (required)
device          ukbd            # Keyboard
#device         uhci            # UHCI PCI->USB interface
#device         ohci            # OHCI PCI->USB interface

npm install -g @vue/cli

npm ERR! code Z_DATA_ERROR
npm ERR! errno -3
npm ERR! zlib: invalid distance too far back

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-09-23T01_42_29_356Z-debug.log

cat /root/.npm/_logs/2019-09-23T01_42_29_356Z-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   '@vue/cli' ]
2 info using npm@6.11.2
3 info using node@v10.16.3
4 verbose npm-session 480f7fa60b2d43ea
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 304 https://registry.npmjs.org/@vue%2fcli 2426ms (from cache)
8 silly pacote tag manifest for @vue/cli@latest fetched in 2436ms
9 timing stage:loadCurrentTree Completed in 2459ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 1ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule @vue/cli@3.11.0 checking installable status
17 http fetch GET 304 https://registry.npmjs.org/@vue%2fcli-shared-utils 389ms (from cache)
18 silly pacote range manifest for @vue/cli-shared-utils@^3.11.0 fetched in 392ms
19 silly resolveWithNewModule @vue/cli-shared-utils@3.11.0 checking installable status
20 http fetch GET 304 https://registry.npmjs.org/cmd-shim 576ms (from cache)
21 silly pacote range manifest for cmd-shim@^2.0.2 fetched in 577ms
22 silly resolveWithNewModule cmd-shim@2.1.0 checking installable status
23 http fetch GET 304 https://registry.npmjs.org/didyoumean 591ms (from cache)
24 silly pacote range manifest for didyoumean@^1.2.1 fetched in 599ms
25 silly resolveWithNewModule didyoumean@1.2.1 checking installable status
26 http fetch GET 304 https://registry.npmjs.org/download-git-repo 214ms (from cache)
27 silly pacote range manifest for download-git-repo@^1.0.2 fetched in 217ms
28 silly resolveWithNewModule download-git-repo@1.1.0 checking installable status
29 http fetch GET 304 https://registry.npmjs.org/debug 615ms (from cache)
30 silly pacote range manifest for debug@^4.1.0 fetched in 617ms
31 silly resolveWithNewModule debug@4.1.1 checking installable status
32 http fetch GET 304 https://registry.npmjs.org/chalk 642ms (from cache)
33 silly pacote range manifest for chalk@^2.4.1 fetched in 643ms
34 silly resolveWithNewModule chalk@2.4.2 checking installable status
35 http fetch GET 304 https://registry.npmjs.org/commander 652ms (from cache)
36 silly pacote range manifest for commander@^2.20.0 fetched in 654ms
37 silly resolveWithNewModule commander@2.20.0 checking installable status
38 http fetch GET 304 https://registry.npmjs.org/deepmerge 706ms (from cache)
39 silly pacote range manifest for deepmerge@^3.2.0 fetched in 707ms
40 silly resolveWithNewModule deepmerge@3.3.0 checking installable status
41 http fetch GET 304 https://registry.npmjs.org/ejs 209ms (from cache)
42 silly pacote range manifest for ejs@^2.6.1 fetched in 212ms
43 silly resolveWithNewModule ejs@2.7.1 checking installable status
44 http fetch GET 304 https://registry.npmjs.org/@vue%2fcli-ui-addon-widgets 792ms (from cache)
45 silly pacote range manifest for @vue/cli-ui-addon-widgets@^3.11.0 fetched in 795ms
46 silly resolveWithNewModule @vue/cli-ui-addon-widgets@3.11.0 checking installable status
47 http fetch GET 304 https://registry.npmjs.org/envinfo 197ms (from cache)
48 silly pacote range manifest for envinfo@^7.1.0 fetched in 199ms
49 silly resolveWithNewModule envinfo@7.3.1 checking installable status
50 http fetch GET 304 https://registry.npmjs.org/execa 229ms (from cache)
51 http fetch GET 304 https://registry.npmjs.org/@vue%2fcli-ui-addon-webpack 838ms (from cache)
52 silly pacote range manifest for execa@^1.0.0 fetched in 234ms
53 silly resolveWithNewModule execa@1.0.0 checking installable status
54 silly pacote range manifest for @vue/cli-ui-addon-webpack@^3.11.0 fetched in 842ms
55 silly resolveWithNewModule @vue/cli-ui-addon-webpack@3.11.0 checking installable status
56 http fetch GET 304 https://registry.npmjs.org/fs-extra 224ms (from cache)
57 silly pacote range manifest for fs-extra@^7.0.1 fetched in 226ms
58 silly resolveWithNewModule fs-extra@7.0.1 checking installable status
59 http fetch GET 304 https://registry.npmjs.org/@vue%2fcli-ui 850ms (from cache)
60 silly pacote range manifest for @vue/cli-ui@^3.11.0 fetched in 853ms
61 silly resolveWithNewModule @vue/cli-ui@3.11.0 checking installable status
62 http fetch GET 304 https://registry.npmjs.org/import-global 222ms (from cache)
63 silly pacote range manifest for import-global@^0.1.0 fetched in 223ms
64 silly resolveWithNewModule import-global@0.1.0 checking installable status
65 http fetch GET 304 https://registry.npmjs.org/inquirer 225ms (from cache)
66 silly pacote range manifest for inquirer@^6.0.0 fetched in 228ms
67 silly resolveWithNewModule inquirer@6.5.2 checking installable status
68 http fetch GET 304 https://registry.npmjs.org/isbinaryfile 191ms (from cache)
69 silly pacote range manifest for isbinaryfile@^4.0.0 fetched in 192ms
70 silly resolveWithNewModule isbinaryfile@4.0.2 checking installable status
71 http fetch GET 304 https://registry.npmjs.org/javascript-stringify 202ms (from cache)
72 http fetch GET 304 https://registry.npmjs.org/lodash.clonedeep 202ms (from cache)
73 silly pacote range manifest for lodash.clonedeep@^4.5.0 fetched in 203ms
74 silly resolveWithNewModule lodash.clonedeep@4.5.0 checking installable status
75 http fetch GET 304 https://registry.npmjs.org/minimist 201ms (from cache)
76 http fetch GET 304 https://registry.npmjs.org/recast 208ms (from cache)
77 silly pacote range manifest for recast@^0.17.5 fetched in 212ms
78 silly resolveWithNewModule recast@0.17.6 checking installable status
79 http fetch GET 304 https://registry.npmjs.org/jscodeshift 225ms (from cache)
80 silly pacote range manifest for jscodeshift@^0.6.4 fetched in 228ms
81 silly resolveWithNewModule jscodeshift@0.6.4 checking installable status
82 http fetch GET 304 https://registry.npmjs.org/request 219ms (from cache)
83 silly pacote range manifest for request@^2.87.0 fetched in 223ms
84 silly resolveWithNewModule request@2.88.0 checking installable status
85 http fetch GET 304 https://registry.npmjs.org/request-promise-native 237ms (from cache)
86 http fetch GET 304 https://registry.npmjs.org/resolve 194ms (from cache)
87 silly pacote range manifest for request-promise-native@^1.0.7 fetched in 239ms
88 silly resolveWithNewModule request-promise-native@1.0.7 checking installable status
89 silly pacote range manifest for resolve@^1.8.1 fetched in 200ms
90 silly resolveWithNewModule resolve@1.12.0 checking installable status
91 http fetch GET 304 https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-1.6.0.tgz 208ms (from cache)
92 silly fetchPackageMetaData error for javascript-stringify@^1.6.0 zlib: invalid distance too far back
93 http fetch GET 304 https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz 199ms (from cache)
94 silly fetchPackageMetaData error for minimist@^1.2.0 zlib: invalid distance too far back
95 http fetch GET 304 https://registry.npmjs.org/semver 216ms (from cache)
96 silly pacote range manifest for semver@^6.0.0 fetched in 217ms
97 silly resolveWithNewModule semver@6.3.0 checking installable status
98 http fetch GET 304 https://registry.npmjs.org/shortid 200ms (from cache)
99 silly pacote range manifest for shortid@^2.2.11 fetched in 201ms
100 silly resolveWithNewModule shortid@2.2.15 checking installable status
101 http fetch GET 304 https://registry.npmjs.org/slash 215ms (from cache)
102 silly pacote range manifest for slash@^2.0.0 fetched in 215ms
103 silly resolveWithNewModule slash@2.0.0 checking installable status
104 http fetch GET 304 https://registry.npmjs.org/validate-npm-package-name 215ms (from cache)
105 http fetch GET 304 https://registry.npmjs.org/yaml-front-matter 183ms (from cache)
106 silly pacote range manifest for yaml-front-matter@^3.4.1 fetched in 184ms
107 silly resolveWithNewModule yaml-front-matter@3.4.1 checking installable status
108 http fetch GET 304 https://registry.npmjs.org/globby 779ms (from cache)
109 silly pacote range manifest for globby@^9.2.0 fetched in 781ms
110 silly resolveWithNewModule globby@9.2.0 checking installable status
111 http fetch GET 304 https://registry.npmjs.org/vue-jscodeshift-adapter 252ms (from cache)
112 silly pacote range manifest for vue-jscodeshift-adapter@^2.0.2 fetched in 253ms
113 silly resolveWithNewModule vue-jscodeshift-adapter@2.0.2 checking installable status
114 http fetch GET 304 https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz 184ms (from cache)
115 silly fetchPackageMetaData error for validate-npm-package-name@^3.0.0 zlib: invalid distance too far back
116 http fetch GET 304 https://registry.npmjs.org/js-yaml 1117ms (from cache)
117 silly pacote range manifest for js-yaml@^3.13.1 fetched in 1119ms
118 silly resolveWithNewModule js-yaml@3.13.1 checking installable status
119 timing stage:rollbackFailedOptional Completed in 1ms
120 timing stage:runTopLevelLifecycles Completed in 4398ms
121 verbose stack ZlibError: zlib: invalid distance too far back
121 verbose stack     at Unzip.Zlib.(anonymous function) (/usr/local/lib/node_modules/npm/node_modules/minizlib/index.js:126:21)
121 verbose stack     at Unzip.emit (events.js:203:15)
121 verbose stack     at Zlib.zlibOnError [as onerror] (zlib.js:165:8)
121 verbose stack     at processChunkSync (zlib.js:403:12)
121 verbose stack     at Unzip.ZlibBase._processChunk (zlib.js:378:12)
121 verbose stack     at Unzip.write (/usr/local/lib/node_modules/npm/node_modules/minizlib/index.js:245:30)
121 verbose stack     at Object.write (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:300:58)
121 verbose stack     at PassThrough.ondata (_stream_readable.js:709:20)
121 verbose stack     at PassThrough.emit (events.js:198:13)
121 verbose stack     at addChunk (_stream_readable.js:288:12)
121 verbose stack     at readableAddChunk (_stream_readable.js:269:11)
121 verbose stack     at PassThrough.Readable.push (_stream_readable.js:224:10)
121 verbose stack     at PassThrough.Transform.push (_stream_transform.js:151:32)
121 verbose stack     at PassThrough.afterTransform (_stream_transform.js:92:10)
121 verbose stack     at PassThrough._transform (_stream_passthrough.js:42:3)
121 verbose stack     at PassThrough.Transform._read (_stream_transform.js:190:10)
122 verbose cwd /usr/dports/www/node10
123 verbose DragonFly 5.6-RELEASE
124 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "@vue/cli"
125 verbose node v10.16.3
126 verbose npm  v6.11.2
127 error code Z_DATA_ERROR
128 error errno -3
129 error zlib: invalid distance too far back
130 verbose exit [ -3, true ]
tuxillo commented 2 years ago

This is what I get with latest defaults:

$ npm install -g @vue/cli
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated graphql-extensions@0.15.0: The `graphql-extensions` API has been removed from Apollo Server 3. Use the plugin API instead: https://www.apollographql.com/docs/apollo-server/integrations/plugins/
npm WARN deprecated apollo-tracing@0.15.0: The `apollo-tracing` package is no longer part of Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#tracing for details
npm WARN deprecated apollo-cache-control@0.14.0: The functionality provided by the `apollo-cache-control` package is built in to `apollo-server-core` starting with Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#cachecontrol for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated subscriptions-transport-ws@0.9.19: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws    For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
npm WARN deprecated graphql-tools@4.0.8: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as @graphql-tools/schema, @graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead

added 898 packages, and audited 899 packages in 23s

90 packages are looking for funding
  run `npm fund` for details

9 vulnerabilities (3 moderate, 6 high)

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

Versions are:

antonioh@devbox:~$ npm version
{
  npm: '8.5.2',
  node: '14.19.3',
  v8: '8.4.371.23-node.87',
  uv: '1.42.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.17.2',
  modules: '83',
  nghttp2: '1.46.0',
  napi: '8',
  llhttp: '2.1.4',
  openssl: '1.1.1o',
  cldr: '40.0',
  icu: '70.1',
  tz: '2021a3',
  unicode: '14.0'
}

$ node --version
v14.19.3