Install nw@sdk error.
qq253498229 opened this issue ยท 1 comments
Issue Type
Before opening an issue, please search and see if it has already been raised.
-
Bug Report
-
Feature Request
-
Successfully reproduced against the latest version of NW.js?
Please use our mailing list or Gitter chatroom to ask questions. The issue tracker is only for bugs and feature requests, in English only. Please note that issues without a repro or code snippet are less likely to be resolved.
Current/Missing Behavior
$ yarn add --dev nw@sdk
yarn add v1.22.10
[1/4] ๐ Resolving packages...
[2/4] ๐ Fetching packages...
[3/4] ๐ Linking dependencies...
[4/4] ๐จ Building fresh packages...
error /Users/wangbin/src/demo-types/nwjs/demo-nwjs5/nwjs/node_modules/nw: Command failed.
Exit code: 1
Command: node lib/install.mjs
Arguments:
Directory: /Users/wangbin/src/demo-types/nwjs/demo-nwjs5/nwjs/node_modules/nw
Output:
(node:85169) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:85169) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
/Users/wangbin/src/demo-types/nwjs/demo-nwjs5/nwjs/node_modules/@eggjs/yauzl/index.js:187
callback(new Error("end of central directory record signature not found"));
^
Error [ZipUncompressStreamError]: end of central directory record signature not found
at /Users/wangbin/src/demo-types/nwjs/demo-nwjs5/nwjs/node_modules/@eggjs/yauzl/index.js:187:14
at /Users/wangbin/src/demo-types/nwjs/demo-nwjs5/nwjs/node_modules/@eggjs/yauzl/index.js:631:5
at /Users/wangbin/src/demo-types/nwjs/demo-nwjs5/nwjs/node_modules/fd-slicer2/index.js:21:9
at FSReqCallback.wrapper [as oncomplete] (node:fs:666:5)
Node.js v20.9.0
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Expected/Proposed Behavior
Additional Info
-
Operating System:macOS 13.6 (22G120)
-
NW.js Version:
-
Repro Link:
-
Code snippet:
-
Crash report:
-
node version: v20.9.0
-
npm version: 10.1.0
-
yarn version: v1.22.10
I also tries node v18.18.0.
@qq253498229 This is a known issue which happens on MacOS only. The installer downloads the file and decompresses it. If it fails to do so, try running npm i nw@sdk
again since the file would be cached and it would try to decompress again.