GithubHelp home page GithubHelp logo

npm-installer's Introduction

nw

An npm installer for NW.js.

npm

Install

Please go through the CHANGELOG carefully and choose the appropriate version. Bug fixes and feature updates are pushed to the repo periodically.

Latest version globally

npm install -g nw

You might run into issues installing globally. Learn how to fix this

Latest version of normal build flavor:

npm install --save-dev nw

Specific version with changes to installer:

npm install --save-dev [email protected]

You may use npm view nw versions to view the list of available versions.

Specify build flavor:

npm install --save-dev nw@sdk

Or set nwjs_build_type=sdk in .npmrc or NWJS_BUILD_TYPE=sdk environment variable.

Specify platform:

Set nwjs_platform in .npmrc or NWJS_PLATFORM environment variable. Defaults to process.platform.

Specify architecture:

Set nwjs_arch in .npmrc or NWJS_ARCH environment variable. Defaults to process.arch.

Specify cache directory:

Set nwjs_cache_dir in .npmrc or NWJS_ARCH environment variable. Defaults to ./node_modules/nw.

Specify cache flag:

Set nwjs_cache in .npmrc or NWJS_ARCH environment variable to keep or delete cached binaries. Defaults to true.

Specify ffmpeg flag:

Set nwjs_ffmpeg in .npmrc or NWJS_ARCH environment variable to toggle downloading community FFmpeg binaries. Defaults to false.

Specify Native Addon flag:

Set nwjs_native_addon in .npmrc or NWJS_NATIVE_ADDON environment variable to toggle downloading NW.js Node headers. Defaults to false.

Specify download URL:

Set nwjs_urlbase in .npmrcor NWJS_URLBASE environment variable. Defaults to https://dl.nwjs.io. The file system (file://) is also supported (for example, file:///home/localghost/local_mirror).

Specify unref flag

Set nwjs_unref in .npmrc or NWJS_UNREF environment variable. Default to false. This is useful if you're using nw package to call the executable and want to prevent zombie processes eating up memory.

Usage

Add a script in your package.json:

{
  "scripts": {
    "start": "nw /path/to/app"
  }
}

Executing npm start runs the NW.js app. Omitting the file path makes NW.js check for valid project in current working directory. You can also call nw directly from node_modules/.bin/nw.

APIs

Find path to the NW.js binary:

import { findpath } from 'nw';
let path = await findpath();

Find the path to the chromedriver binary

import { findpath } from 'nw';
let path = await findpath('chromedriver', { flavor: 'sdk' });

Download specific versions independant of installer version

import { get } from 'nw';

await get({
  // options
});

Options:

Name Type Default Description
version string | "latest" | "stable" "latest" Runtime version
flavor "normal" | "sdk" "normal" Runtime flavor
platform "linux" | "osx" | "win" Host platform
arch "ia32" | "x64" | "arm64" Host architecture
downloadUrl "https://dl.nwjs.io" | "https://npm.taobao.org/mirrors/nwjs" | https://npmmirror.com/mirrors/nwjs | "https://github.com/corwin-of-amber/nw.js/releases/" "https://dl.nwjs.io" Download server
cacheDir string "./cache" Directory to cache NW binaries
cache boolean true If true the existing cache is used. Otherwise it removes and redownloads it.
ffmpeg boolean false If true the chromium ffmpeg is replaced by community version with proprietary codecs.
nodeAddon false | "gyp" false Download Node headers

License

NW.js's code and this installer use the MIT license.

npm-installer's People

Contributors

adam-lynch avatar af avatar artzhookov avatar ayapi avatar ayushmanchhabra avatar chenhaizano avatar corwin-of-amber avatar cspotcode avatar dependabot[bot] avatar fweinb avatar jhermsmeier avatar kevva avatar lostfictions avatar max-mapper avatar merqlove avatar mithgol avatar nisargjhaveri avatar nurishi-vcube avatar rogerwang avatar seeekr avatar shama avatar ssilence avatar stepancar avatar thejaredwilcurt avatar trofivan avatar tschwemley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

npm-installer's Issues

Ubuntu 15.04 install problems

Info

sudo npm install nw -g
[sudo] password for master:
/usr/local/bin/nw -> /usr/local/lib/node_modules/nw/bin/nw

[email protected] postinstall /usr/local/lib/node_modules/nw
node scripts/install.js

npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! [email protected] postinstall: node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is most likely a problem with the nw package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls nw
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.19.0-21-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "nw" "-g"
npm ERR! cwd /home/master/NW
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/master/NW/npm-debug.log
npm ERR! not ok code 0

Windows 10, node 5.9.1 fails to download

> [email protected] postinstall C:\Users\voxking\Desktop\react.nw.ts\node_modules\nw                                                               
> node scripts/install.js                                                                                                                  

end of central directory record signature not found                                                                                        
npm ERR! Windows_NT 10.0.10586                                                                                                             
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "nw" "--save"
npm ERR! node v5.9.1                                                                                                                       
npm ERR! npm  v3.7.3                                                                                                                       
npm ERR! code ELIFECYCLE                                                                                                                   

npm ERR! [email protected] postinstall: `node scripts/install.js`                                                                                  
npm ERR! Exit status 1                                                                                                                     
npm ERR!                                                                                                                                   
npm ERR! Failed at the [email protected] postinstall script 'node scripts/install.js'.                                                             
npm ERR! Make sure you have the latest version of node.js and npm installed.                                                               
npm ERR! If you do, this is most likely a problem with the nw package,                                                                     
npm ERR! not with npm itself.                                                                                                              
npm ERR! Tell the author that this fails on your system:                                                                                   
npm ERR!     node scripts/install.js                                                                                                       
npm ERR! You can get information on how to open an issue for this project with:                                                            
npm ERR!     npm bugs nw                                                                                                                   
npm ERR! Or if that isn't available, you can get their info via:                                                                           
npm ERR!     npm owner ls nw                                                                                                               
npm ERR! There is likely additional logging output above.                                                                                  

npm ERR! Please include the following file with any support request:                                                                       
npm ERR!     C:\Users\voxking\Desktop\react.nw.ts\npm-debug.log                                                                            

cannot install on a flash drive on Windows XP

Having launched npm install nw I've got the following error:

npm ERR! Windows_NT 5.1.2600
npm ERR! argv "c:\\Utils\\Node.js\\\\node.exe" "c:\\Utils\\Node.js\\node_modules
\\npm\\bin\\npm-cli.js" "install" "nw"
npm ERR! node v0.12.2
npm ERR! npm  v2.8.4
npm ERR! path C:\Documents and Settings\username.DOMAINNAME\Application Data\npm-cache\concat-map\0.0.1\package\package.json
npm ERR! code EPERM
npm ERR! errno -4048

npm ERR! Error: EPERM, rename 'C:\Documents and Settings\username.DOMAINNAME\Application Data\npm-cache\concat-map\0.0.1\package\package.json'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM, rename 'C:\Documents and Settings\username.DOMAINNAME\Application Data\npm-cache\concat-map\0.0.1\package\package.json']
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   path: 'C:\\Documents and Settings\\username.DOMAINNAME\\Application Data\\npm-cache\\concat-map\\0.0.1\\package\\package.json',
npm ERR!   parent: 'brace-expansion' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

where username.DOMAINNAME is my local user and domain.

I have the necessary administator rights and thus I have to suspect some other cause for that EPERM. For example, the tree of dependencies might be so deep that it does not fit into the FAT32 limit of full path's length.

However, I am not sure of the current depth of the tree of dependencies for the nw package. Some other cause is also possible.

`npm start` should not wait for nw.js to finish

Currently npm start seems to wait until nw.js finishes.

It probably should run nw.js as a non-modal child window (as if it were start "" nw on Windows or nw & on other systems) and finish immediately.

As a workaround it is possible to replace "start": "nw" in package.json with "start": "start \"\" nw" on Windows and "start": "nw &" on other systems, but such package.json is no longer cross-platform.

Postinstall error

Hi I receive the following error when running sudo npm install nw. Please help.

postinstall: WARN saveError ENOENT: no such file npm WARN enoent ENOENT: no such file or directory, open '/home/rekwet/Documents/package.json'
npm WARN Documents No description
npm WARN Documents No repository field.
npm WARN Documents No README data
npm WARN Documents No license field.

load local file is error!!!

like this in .npmrc

NWJS_URLBASE=file:///C:/Users/anchengjian/Downloads

and I got an error

Could not find /C:/Users/anchengjian/Downloads0.20.1/nwjs-sdk-v0.20.1-win-x64.zip

installation fails on debian/jessie

The npm-based nw installation fails on debian/jessie:

$ sudo npm install -g nw
> [email protected] postinstall /usr/local/lib/node_modules/nw
> node scripts/install.js
sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

It can be fixed using a workaround:

sudo ln -s /usr/bin/nodejs /usr/bin/node

From there on, the postinstall script will run properly:

/usr/local/bin/nw -> /usr/local/lib/node_modules/nw/bin/nw
[email protected] postinstall /usr/local/lib/node_modules/nw
node scripts/install.js

In my impression, the post install script should check if either /usr/bin/node or /usr/bin/nodejs exists and use the version reported as existing. The nw installer may assume elsewhere that the node executable has been installed as node while this is no longer the case in the Debian distro.

Local install error

I'm on linux mint. When I try the example and install locally as "npm install nw" I get this error:

npm ERR! Error: EACCES, symlink '../nw/bin/nw'
npm ERR! { [Error: EACCES, symlink '../nw/bin/nw'] errno: 3, code: 'EACCES', path: '../nw/bin/nw' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "nw"
npm ERR! cwd /home/bruce/Git/nw-sample-apps
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path ../nw/bin/nw
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, symlink '../nw/bin/nw'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/bruce/Git/nw-sample-apps/npm-debug.log
npm ERR! not ok code 0

about sound app fail node web kit 32 play it with windows 64

I hope somebody can help me, I make a simple application and bag it with node webkit, I did it with node web kit 32- bit v0.3.7 in my windows operating system 64, the application ran but did not sound, then I returned to create it with node web kit 64-bit v0.12.3 and play it with sound in my windows 64, my question is that then the sounds with node web kit 32 bit does not run well on an windows operating system 64, i should create to windows 32 with nodeweb kit 32-bit and to windows 64 with the node web kit 64, Thank you?

“re-evaluating native module sources is not supported”

Currently npm install nw on a recent Node.js (v6.0.0) yields the following warning (twice):

(node:11476) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.

The current full tree of nw package's dependencies (as reported by npmtree) look like this:

  • decompress@^2.2.1
    • buffer-to-vinyl@^1.0.0
      • file-type@^3.1.0
      • readable-stream@^2.0.2
        • core-util-is@~1.0.0
        • inherits@~2.0.1
        • isarray@~1.0.0
        • process-nextick-args@~1.0.6
        • string_decoder@~0.10.x
        • util-deprecate@~1.0.1
      • uuid@^2.0.1
      • vinyl@^1.0.0
    • concat-stream@^1.4.6
      • inherits@~2.0.1
      • typedarray@~0.0.5
      • readable-stream@~2.0.0
        • core-util-is@~1.0.0
        • inherits@~2.0.1
        • isarray@~1.0.0
        • process-nextick-args@~1.0.6
        • string_decoder@~0.10.x
        • util-deprecate@~1.0.1
    • decompress-tar@^3.0.0
      • is-tar@^1.0.0
      • object-assign@^2.0.0
      • strip-dirs@^1.0.0
        • chalk@^1.0.0
          • ansi-styles@^2.2.1
          • escape-string-regexp@^1.0.2
          • has-ansi@^2.0.0
            • ansi-regex@^2.0.0
          • strip-ansi@^3.0.0
            • ansi-regex@^2.0.0
          • supports-color@^2.0.0
        • get-stdin@^4.0.1
        • is-absolute@^0.1.5
          • is-relative@^0.1.0
        • is-natural-number@^2.0.0
        • minimist@^1.1.0
        • sum-up@^1.0.1
          • chalk@^1.0.0
            • ansi-styles@^2.2.1
            • escape-string-regexp@^1.0.2
            • has-ansi@^2.0.0
              • ansi-regex@^2.0.0
            • strip-ansi@^3.0.0
              • ansi-regex@^2.0.0
            • supports-color@^2.0.0
      • tar-stream@^1.1.1
        • bl@^1.0.0
          • readable-stream@~2.0.5
            • core-util-is@~1.0.0
            • inherits@~2.0.1
            • isarray@~1.0.0
            • process-nextick-args@~1.0.6
            • string_decoder@~0.10.x
            • util-deprecate@~1.0.1
        • end-of-stream@^1.0.0
          • once@~1.3.0
            • wrappy@1
        • readable-stream@^2.0.0
          • core-util-is@~1.0.0
          • inherits@~2.0.1
          • isarray@~1.0.0
          • process-nextick-args@~1.0.6
          • string_decoder@~0.10.x
          • util-deprecate@~1.0.1
        • xtend@^4.0.0
      • through2@^0.6.1
        • readable-stream@>=1.0.33-1 <1.1.0-0
        • xtend@>=4.0.0 <4.1.0-0
      • vinyl@^0.4.3
        • clone@^0.2.0
        • clone-stats@^0.0.1
    • decompress-tarbz2@^3.0.0
      • is-bzip2@^1.0.0
      • object-assign@^2.0.0
      • seek-bzip@^1.0.3
        • commander@~2.8.1
          • graceful-readlink@>= 1.0.0
      • strip-dirs@^1.0.0
        • chalk@^1.0.0
          • ansi-styles@^2.2.1
          • escape-string-regexp@^1.0.2
          • has-ansi@^2.0.0
            • ansi-regex@^2.0.0
          • strip-ansi@^3.0.0
            • ansi-regex@^2.0.0
          • supports-color@^2.0.0
        • get-stdin@^4.0.1
        • is-absolute@^0.1.5
          • is-relative@^0.1.0
        • is-natural-number@^2.0.0
        • minimist@^1.1.0
        • sum-up@^1.0.1
          • chalk@^1.0.0
            • ansi-styles@^2.2.1
            • escape-string-regexp@^1.0.2
            • has-ansi@^2.0.0
              • ansi-regex@^2.0.0
            • strip-ansi@^3.0.0
              • ansi-regex@^2.0.0
            • supports-color@^2.0.0
      • tar-stream@^1.1.1
        • bl@^1.0.0
          • readable-stream@~2.0.5
            • core-util-is@~1.0.0
            • inherits@~2.0.1
            • isarray@~1.0.0
            • process-nextick-args@~1.0.6
            • string_decoder@~0.10.x
            • util-deprecate@~1.0.1
        • end-of-stream@^1.0.0
          • once@~1.3.0
            • wrappy@1
        • readable-stream@^2.0.0
          • core-util-is@~1.0.0
          • inherits@~2.0.1
          • isarray@~1.0.0
          • process-nextick-args@~1.0.6
          • string_decoder@~0.10.x
          • util-deprecate@~1.0.1
        • xtend@^4.0.0
      • through2@^0.6.1
        • readable-stream@>=1.0.33-1 <1.1.0-0
        • xtend@>=4.0.0 <4.1.0-0
      • vinyl@^0.4.3
        • clone@^0.2.0
        • clone-stats@^0.0.1
    • decompress-targz@^3.0.0
      • is-gzip@^1.0.0
      • object-assign@^2.0.0
      • strip-dirs@^1.0.0
        • chalk@^1.0.0
          • ansi-styles@^2.2.1
          • escape-string-regexp@^1.0.2
          • has-ansi@^2.0.0
            • ansi-regex@^2.0.0
          • strip-ansi@^3.0.0
            • ansi-regex@^2.0.0
          • supports-color@^2.0.0
        • get-stdin@^4.0.1
        • is-absolute@^0.1.5
          • is-relative@^0.1.0
        • is-natural-number@^2.0.0
        • minimist@^1.1.0
        • sum-up@^1.0.1
          • chalk@^1.0.0
            • ansi-styles@^2.2.1
            • escape-string-regexp@^1.0.2
            • has-ansi@^2.0.0
              • ansi-regex@^2.0.0
            • strip-ansi@^3.0.0
              • ansi-regex@^2.0.0
            • supports-color@^2.0.0
      • tar-stream@^1.1.1
        • bl@^1.0.0
          • readable-stream@~2.0.5
            • core-util-is@~1.0.0
            • inherits@~2.0.1
            • isarray@~1.0.0
            • process-nextick-args@~1.0.6
            • string_decoder@~0.10.x
            • util-deprecate@~1.0.1
        • end-of-stream@^1.0.0
          • once@~1.3.0
            • wrappy@1
        • readable-stream@^2.0.0
          • core-util-is@~1.0.0
          • inherits@~2.0.1
          • isarray@~1.0.0
          • process-nextick-args@~1.0.6
          • string_decoder@~0.10.x
          • util-deprecate@~1.0.1
        • xtend@^4.0.0
      • through2@^0.6.1
        • readable-stream@>=1.0.33-1 <1.1.0-0
        • xtend@>=4.0.0 <4.1.0-0
      • vinyl@^0.4.3
        • clone@^0.2.0
        • clone-stats@^0.0.1
    • decompress-unzip@^3.0.0
      • is-zip@^1.0.0
      • read-all-stream@^3.0.0
        • pinkie-promise@^2.0.0
          • pinkie@^2.0.0
        • readable-stream@^2.0.0
          • core-util-is@~1.0.0
          • inherits@~2.0.1
          • isarray@~1.0.0
          • process-nextick-args@~1.0.6
          • string_decoder@~0.10.x
          • util-deprecate@~1.0.1
      • stat-mode@^0.2.0
      • strip-dirs@^1.0.0
        • chalk@^1.0.0
          • ansi-styles@^2.2.1
          • escape-string-regexp@^1.0.2
          • has-ansi@^2.0.0
            • ansi-regex@^2.0.0
          • strip-ansi@^3.0.0
            • ansi-regex@^2.0.0
          • supports-color@^2.0.0
        • get-stdin@^4.0.1
        • is-absolute@^0.1.5
          • is-relative@^0.1.0
        • is-natural-number@^2.0.0
        • minimist@^1.1.0
        • sum-up@^1.0.1
          • chalk@^1.0.0
            • ansi-styles@^2.2.1
            • escape-string-regexp@^1.0.2
            • has-ansi@^2.0.0
              • ansi-regex@^2.0.0
            • strip-ansi@^3.0.0
              • ansi-regex@^2.0.0
            • supports-color@^2.0.0
      • through2@^2.0.0
        • readable-stream@~2.0.0
          • core-util-is@~1.0.0
          • inherits@~2.0.1
          • isarray@~1.0.0
          • process-nextick-args@~1.0.6
          • string_decoder@~0.10.x
          • util-deprecate@~1.0.1
        • xtend@~4.0.0
      • vinyl@^1.0.0
      • yauzl@^2.2.1
        • fd-slicer@~1.0.1
          • pend@~1.2.0
    • get-stdin@^4.0.1
    • meow@^3.0.0
      • camelcase-keys@^2.0.0
        • camelcase@^2.0.0
        • map-obj@^1.0.0
      • decamelize@^1.1.2
        • escape-string-regexp@^1.0.4
      • loud-rejection@^1.0.0
        • array-find-index@^1.0.0
        • signal-exit@^2.1.2
      • map-obj@^1.0.1
      • minimist@^1.1.3
      • normalize-package-data@^2.3.4
        • hosted-git-info@^2.1.4
        • is-builtin-module@^1.0.0
          • builtin-modules@^1.0.0
        • semver@2 || 3 || 4 || 5
        • validate-npm-package-license@^3.0.1
          • spdx-correct@~1.0.0
            • spdx-license-ids@^1.0.2
          • spdx-expression-parse@~1.0.0
            • spdx-exceptions@^1.0.4
            • spdx-license-ids@^1.0.0
      • object-assign@^4.0.1
      • read-pkg-up@^1.0.1
        • find-up@^1.0.0
          • path-exists@^2.0.0
            • pinkie-promise@^2.0.0
              • pinkie@^2.0.0
          • pinkie-promise@^2.0.0
            • pinkie@^2.0.0
        • read-pkg@^1.0.0
          • load-json-file@^1.0.0
            • graceful-fs@^4.1.2
            • parse-json@^2.2.0
              • error-ex@^1.2.0
                • is-arrayish@^0.2.1
            • pify@^2.0.0
            • pinkie-promise@^2.0.0
              • pinkie@^2.0.0
            • strip-bom@^2.0.0
              • is-utf8@^0.2.0
          • normalize-package-data@^2.3.2
            • hosted-git-info@^2.1.4
            • is-builtin-module@^1.0.0
              • builtin-modules@^1.0.0
            • semver@2 || 3 || 4 || 5
            • validate-npm-package-license@^3.0.1
              • spdx-correct@~1.0.0
                • spdx-license-ids@^1.0.2
              • spdx-expression-parse@~1.0.0
                • spdx-exceptions@^1.0.4
                • spdx-license-ids@^1.0.0
          • path-type@^1.0.0
            • graceful-fs@^4.1.2
            • pify@^2.0.0
            • pinkie-promise@^2.0.0
              • pinkie@^2.0.0
      • redent@^1.0.0
        • indent-string@^2.1.0
          • repeating@^2.0.0
            • is-finite@^1.0.0
              • number-is-nan@^1.0.0
        • strip-indent@^1.0.1
          • get-stdin@^4.0.1
      • trim-newlines@^1.0.0
    • stream-combiner2@^1.0.2
      • duplexer2@~0.1.0
        • readable-stream@^2.0.2
          • core-util-is@~1.0.0
          • inherits@~2.0.1
          • isarray@~1.0.0
          • process-nextick-args@~1.0.6
          • string_decoder@~0.10.x
          • util-deprecate@~1.0.1
      • readable-stream@^2.0.2
        • core-util-is@~1.0.0
        • inherits@~2.0.1
        • isarray@~1.0.0
        • process-nextick-args@~1.0.6
        • string_decoder@~0.10.x
        • util-deprecate@~1.0.1
    • vinyl-assign@^1.0.1
      • object-assign@^4.0.1
      • readable-stream@^2.0.0
        • core-util-is@~1.0.0
        • inherits@~2.0.1
        • isarray@~1.0.0
        • process-nextick-args@~1.0.6
        • string_decoder@~0.10.x
        • util-deprecate@~1.0.1
    • vinyl-fs@^1.0.0
      • duplexify@^3.2.0
        • [email protected]
          • once@~1.3.0
            • wrappy@1
        • inherits@^2.0.1
        • readable-stream@^2.0.0
          • core-util-is@~1.0.0
          • inherits@~2.0.1
          • isarray@~1.0.0
          • process-nextick-args@~1.0.6
          • string_decoder@~0.10.x
          • util-deprecate@~1.0.1
      • glob-stream@^4.0.1
        • glob@^4.3.1
          • inflight@^1.0.4
            • once@^1.3.0
              • wrappy@1
            • wrappy@1
          • inherits@2
          • minimatch@^2.0.1
          • once@^1.3.0
            • wrappy@1
        • minimatch@^2.0.1
        • ordered-read-streams@^0.1.0
        • glob2base@^0.0.12
          • find-index@^0.1.1
        • unique-stream@^2.0.2
          • json-stable-stringify@^1.0.0
            • jsonify@~0.0.0
          • through2-filter@^2.0.0
            • through2@~2.0.0
              • readable-stream@~2.0.0
                • core-util-is@~1.0.0
                • inherits@~2.0.1
                • isarray@~1.0.0
                • process-nextick-args@~1.0.6
                • string_decoder@~0.10.x
                • util-deprecate@~1.0.1
              • xtend@~4.0.0
            • xtend@~4.0.0
        • through2@^0.6.1
          • readable-stream@>=1.0.33-1 <1.1.0-0
          • xtend@>=4.0.0 <4.1.0-0
      • glob-watcher@^0.0.8
        • gaze@^0.5.1
          • globule@~0.1.0
            • lodash@~1.0.1
            • glob@~3.1.21
              • minimatch@~0.2.11
                • lru-cache@2
                • sigmund@~1.0.0
              • graceful-fs@~1.2.0
              • inherits@1
            • minimatch@~0.2.11
              • lru-cache@2
              • sigmund@~1.0.0
      • graceful-fs@^3.0.0
      • merge-stream@^0.1.7
        • through2@^0.6.1
          • readable-stream@>=1.0.33-1 <1.1.0-0
          • xtend@>=4.0.0 <4.1.0-0
      • mkdirp@^0.5.0
      • object-assign@^2.0.0
      • strip-bom@^1.0.0
        • first-chunk-stream@^1.0.0
        • is-utf8@^0.2.0
      • through2@^0.6.1
        • readable-stream@>=1.0.33-1 <1.1.0-0
        • xtend@>=4.0.0 <4.1.0-0
      • vinyl@^0.4.0
        • clone@^0.2.0
        • clone-stats@^0.0.1
  • download@^3.3.0
    • concat-stream@^1.4.6
      • inherits@~2.0.1
      • typedarray@~0.0.5
      • readable-stream@~2.0.0
        • core-util-is@~1.0.0
        • inherits@~2.0.1
        • isarray@~1.0.0
        • process-nextick-args@~1.0.6
        • string_decoder@~0.10.x
        • util-deprecate@~1.0.1
    • decompress-tar@^2.0.1
      • is-tar@^1.0.0
      • strip-dirs@^0.1.1
        • chalk@^0.5.1
          • ansi-styles@^1.1.0
          • escape-string-regexp@^1.0.0
          • has-ansi@^0.1.0
            • ansi-regex@^0.2.0
          • strip-ansi@^0.3.0
            • ansi-regex@^0.2.1
          • supports-color@^0.2.0
        • get-stdin@^3.0.0
        • is-absolute@^0.1.4
          • is-relative@^0.1.0
        • is-integer@^1.0.3
          • is-finite@^1.0.0
            • number-is-nan@^1.0.0
        • minimist@^1.1.0
      • tar-stream@^0.4.5
        • bl@^0.9.0
          • readable-stream@~1.0.26
        • end-of-stream@^1.0.0
          • once@~1.3.0
            • wrappy@1
        • readable-stream@^1.0.27-1
        • xtend@^4.0.0
      • through2@^0.6.1
        • readable-stream@>=1.0.33-1 <1.1.0-0
        • xtend@>=4.0.0 <4.1.0-0
      • vinyl@^0.4.3
        • clone@^0.2.0
        • clone-stats@^0.0.1
    • decompress-tarbz2@^2.0.1
      • is-bzip2@^1.0.0
      • seek-bzip@^1.0.3
        • commander@~2.8.1
          • graceful-readlink@>= 1.0.0
      • strip-dirs@^0.1.1
        • chalk@^0.5.1
          • ansi-styles@^1.1.0
          • escape-string-regexp@^1.0.0
          • has-ansi@^0.1.0
            • ansi-regex@^0.2.0
          • strip-ansi@^0.3.0
            • ansi-regex@^0.2.1
          • supports-color@^0.2.0
        • get-stdin@^3.0.0
        • is-absolute@^0.1.4
          • is-relative@^0.1.0
        • is-integer@^1.0.3
          • is-finite@^1.0.0
            • number-is-nan@^1.0.0
        • minimist@^1.1.0
      • tar-stream@^0.4.5
        • bl@^0.9.0
          • readable-stream@~1.0.26
        • end-of-stream@^1.0.0
          • once@~1.3.0
            • wrappy@1
        • readable-stream@^1.0.27-1
        • xtend@^4.0.0
      • through2@^0.6.1
        • readable-stream@>=1.0.33-1 <1.1.0-0
        • xtend@>=4.0.0 <4.1.0-0
      • vinyl@^0.4.3
        • clone@^0.2.0
        • clone-stats@^0.0.1
    • decompress-targz@^2.0.1
      • is-gzip@^1.0.0
      • strip-dirs@^1.0.0
        • chalk@^1.0.0
          • ansi-styles@^2.2.1
          • escape-string-regexp@^1.0.2
          • has-ansi@^2.0.0
            • ansi-regex@^2.0.0
          • strip-ansi@^3.0.0
            • ansi-regex@^2.0.0
          • supports-color@^2.0.0
        • get-stdin@^4.0.1
        • is-absolute@^0.1.5
          • is-relative@^0.1.0
        • is-natural-number@^2.0.0
        • minimist@^1.1.0
        • sum-up@^1.0.1
          • chalk@^1.0.0
            • ansi-styles@^2.2.1
            • escape-string-regexp@^1.0.2
            • has-ansi@^2.0.0
              • ansi-regex@^2.0.0
            • strip-ansi@^3.0.0
              • ansi-regex@^2.0.0
            • supports-color@^2.0.0
      • tar-stream@^1.1.1
        • bl@^1.0.0
          • readable-stream@~2.0.5
            • core-util-is@~1.0.0
            • inherits@~2.0.1
            • isarray@~1.0.0
            • process-nextick-args@~1.0.6
            • string_decoder@~0.10.x
            • util-deprecate@~1.0.1
        • end-of-stream@^1.0.0
          • once@~1.3.0
            • wrappy@1
        • readable-stream@^2.0.0
          • core-util-is@~1.0.0
          • inherits@~2.0.1
          • isarray@~1.0.0
          • process-nextick-args@~1.0.6
          • string_decoder@~0.10.x
          • util-deprecate@~1.0.1
        • xtend@^4.0.0
      • through2@^0.6.1
        • readable-stream@>=1.0.33-1 <1.1.0-0
        • xtend@>=4.0.0 <4.1.0-0
      • vinyl@^0.4.3
        • clone@^0.2.0
        • clone-stats@^0.0.1
    • decompress-unzip@^2.0.0
      • is-zip@^1.0.0
      • strip-dirs@^1.0.0
        • chalk@^1.0.0
          • ansi-styles@^2.2.1
          • escape-string-regexp@^1.0.2
          • has-ansi@^2.0.0
            • ansi-regex@^2.0.0
          • strip-ansi@^3.0.0
            • ansi-regex@^2.0.0
          • supports-color@^2.0.0
        • get-stdin@^4.0.1
        • is-absolute@^0.1.5
          • is-relative@^0.1.0
        • is-natural-number@^2.0.0
        • minimist@^1.1.0
        • sum-up@^1.0.1
          • chalk@^1.0.0
            • ansi-styles@^2.2.1
            • escape-string-regexp@^1.0.2
            • has-ansi@^2.0.0
              • ansi-regex@^2.0.0
            • strip-ansi@^3.0.0
              • ansi-regex@^2.0.0
            • supports-color@^2.0.0
      • through2@^0.6.1
        • readable-stream@>=1.0.33-1 <1.1.0-0
        • xtend@>=4.0.0 <4.1.0-0
      • vinyl@^0.4.3
        • clone@^0.2.0
        • clone-stats@^0.0.1
      • yauzl@^2.2.1
        • fd-slicer@~1.0.1
          • pend@~1.2.0
    • download-status@^2.0.1
      • chalk@^0.5.1
        • ansi-styles@^1.1.0
        • escape-string-regexp@^1.0.0
        • has-ansi@^0.1.0
          • ansi-regex@^0.2.0
        • strip-ansi@^0.3.0
          • ansi-regex@^0.2.1
        • supports-color@^0.2.0
      • lpad-align@^1.0.0
        • get-stdin@^4.0.1
        • longest@^1.0.0
        • lpad@^2.0.1
        • meow@^3.3.0
          • camelcase-keys@^2.0.0
            • camelcase@^2.0.0
            • map-obj@^1.0.0
          • decamelize@^1.1.2
            • escape-string-regexp@^1.0.4
          • loud-rejection@^1.0.0
            • array-find-index@^1.0.0
            • signal-exit@^2.1.2
          • map-obj@^1.0.1
          • minimist@^1.1.3
          • normalize-package-data@^2.3.4
            • hosted-git-info@^2.1.4
            • is-builtin-module@^1.0.0
              • builtin-modules@^1.0.0
            • semver@2 || 3 || 4 || 5
            • validate-npm-package-license@^3.0.1
              • spdx-correct@~1.0.0
                • spdx-license-ids@^1.0.2
              • spdx-expression-parse@~1.0.0
                • spdx-exceptions@^1.0.4
                • spdx-license-ids@^1.0.0
          • object-assign@^4.0.1
          • read-pkg-up@^1.0.1
            • find-up@^1.0.0
              • path-exists@^2.0.0
                • pinkie-promise@^2.0.0
                  • pinkie@^2.0.0
              • pinkie-promise@^2.0.0
                • pinkie@^2.0.0
            • read-pkg@^1.0.0
              • load-json-file@^1.0.0
                • graceful-fs@^4.1.2
                • parse-json@^2.2.0
                  • error-ex@^1.2.0
                    • is-arrayish@^0.2.1
                • pify@^2.0.0
                • pinkie-promise@^2.0.0
                  • pinkie@^2.0.0
                • strip-bom@^2.0.0
                  • is-utf8@^0.2.0
              • normalize-package-data@^2.3.2
                • hosted-git-info@^2.1.4
                • is-builtin-module@^1.0.0
                  • builtin-modules@^1.0.0
                • semver@2 || 3 || 4 || 5
                • validate-npm-package-license@^3.0.1
                  • spdx-correct@~1.0.0
                    • spdx-license-ids@^1.0.2
                  • spdx-expression-parse@~1.0.0
                    • spdx-exceptions@^1.0.4
                    • spdx-license-ids@^1.0.0
              • path-type@^1.0.0
                • graceful-fs@^4.1.2
                • pify@^2.0.0
                • pinkie-promise@^2.0.0
                  • pinkie@^2.0.0
          • redent@^1.0.0
            • indent-string@^2.1.0
              • repeating@^2.0.0
                • is-finite@^1.0.0
                  • number-is-nan@^1.0.0
            • strip-indent@^1.0.1
              • get-stdin@^4.0.1
          • trim-newlines@^1.0.0
      • object-assign@^2.0.0
      • progress@^1.1.8
    • each-async@^1.0.0
      • onetime@^1.0.0
      • set-immediate-shim@^1.0.0
    • get-stdin@^3.0.0
    • gulp-rename@^1.2.0
    • meow@^2.0.0
      • camelcase-keys@^1.0.0
        • camelcase@^1.0.1
        • map-obj@^1.0.0
      • indent-string@^1.1.0
        • get-stdin@^4.0.1
        • minimist@^1.1.0
        • repeating@^1.1.0
          • is-finite@^1.0.0
            • number-is-nan@^1.0.0
      • minimist@^1.1.0
      • object-assign@^2.0.0
    • rc@^0.5.1
    • request@^2.34.0
      • aws-sign2@~0.6.0
      • aws4@^1.2.1
        • lru-cache@^4.0.0
          • pseudomap@^1.0.1
          • yallist@^2.0.0
      • bl@~1.1.2
        • readable-stream@~2.0.5
          • core-util-is@~1.0.0
          • inherits@~2.0.1
          • isarray@~1.0.0
          • process-nextick-args@~1.0.6
          • string_decoder@~0.10.x
          • util-deprecate@~1.0.1
      • caseless@~0.11.0
      • combined-stream@~1.0.5
        • delayed-stream@~1.0.0
      • extend@~3.0.0
      • forever-agent@~0.6.1
      • form-data@~1.0.0-rc3
        • async@^1.5.2
        • combined-stream@^1.0.5
          • delayed-stream@~1.0.0
        • mime-types@^2.1.10
          • mime-db@~1.23.0
      • har-validator@~2.0.6
        • chalk@^1.1.1
          • ansi-styles@^2.2.1
          • escape-string-regexp@^1.0.2
          • has-ansi@^2.0.0
            • ansi-regex@^2.0.0
          • strip-ansi@^3.0.0
            • ansi-regex@^2.0.0
          • supports-color@^2.0.0
        • commander@^2.9.0
          • graceful-readlink@>= 1.0.0
        • is-my-json-valid@^2.12.4
          • generate-function@^2.0.0
          • generate-object-property@^1.1.0
            • is-property@^1.0.0
          • [email protected]
          • xtend@^4.0.0
        • pinkie-promise@^2.0.0
          • pinkie@^2.0.0
      • hawk@~3.1.3
      • http-signature@~1.1.0
      • is-typedarray@~1.0.0
      • isstream@~0.1.2
      • json-stringify-safe@~5.0.1
      • mime-types@~2.1.7
        • mime-db@~1.23.0
      • node-uuid@~1.4.7
      • oauth-sign@~0.8.1
      • qs@~6.1.0
      • stringstream@~0.0.4
      • tough-cookie@~2.2.0
      • tunnel-agent@~0.4.1
    • stream-combiner@^0.2.1
      • duplexer@~0.1.1
      • through@~2.3.4
    • through2@^0.6.1
      • readable-stream@>=1.0.33-1 <1.1.0-0
      • xtend@>=4.0.0 <4.1.0-0
    • url-regex@^2.0.2
      • ip-regex@^1.0.1
    • vinyl@^0.4.3
      • clone@^0.2.0
      • clone-stats@^0.0.1
    • vinyl-fs@^0.3.7
      • defaults@^1.0.0
        • clone@^1.0.2
      • glob-stream@^3.1.5
        • glob@^4.3.1
          • inflight@^1.0.4
            • once@^1.3.0
              • wrappy@1
            • wrappy@1
          • inherits@2
          • minimatch@^2.0.1
          • once@^1.3.0
            • wrappy@1
        • minimatch@^2.0.1
        • ordered-read-streams@^0.1.0
        • glob2base@^0.0.12
          • find-index@^0.1.1
        • unique-stream@^1.0.0
        • through2@^0.6.1
          • readable-stream@>=1.0.33-1 <1.1.0-0
          • xtend@>=4.0.0 <4.1.0-0
      • glob-watcher@^0.0.6
        • gaze@^0.5.1
          • globule@~0.1.0
            • lodash@~1.0.1
            • glob@~3.1.21
              • minimatch@~0.2.11
                • lru-cache@2
                • sigmund@~1.0.0
              • graceful-fs@~1.2.0
              • inherits@1
            • minimatch@~0.2.11
              • lru-cache@2
              • sigmund@~1.0.0
      • graceful-fs@^3.0.0
      • mkdirp@^0.5.0
      • strip-bom@^1.0.0
        • first-chunk-stream@^1.0.0
        • is-utf8@^0.2.0
      • through2@^0.6.1
        • readable-stream@>=1.0.33-1 <1.1.0-0
        • xtend@>=4.0.0 <4.1.0-0
      • vinyl@^0.4.0
        • clone@^0.2.0
        • clone-stats@^0.0.1
    • ware@^1.0.1
  • file-exists@^0.1.1
  • merge@^1.2.0
  • multimeter@^0.1.1
    • charm@~0.1.1
  • rimraf@^2.2.8
    • glob@^7.0.0
      • inflight@^1.0.4
        • once@^1.3.0
          • wrappy@1
        • wrappy@1
      • inherits@2
      • minimatch@2 || 3
      • once@^1.3.0
        • wrappy@1
      • path-is-absolute@^1.0.0
  • semver@^4.3.0
  • yargs@^3.2.1
    • camelcase@^2.0.1
    • cliui@^3.0.3
      • string-width@^1.0.1
        • code-point-at@^1.0.0
          • number-is-nan@^1.0.0
        • is-fullwidth-code-point@^1.0.0
          • number-is-nan@^1.0.0
        • strip-ansi@^3.0.0
          • ansi-regex@^2.0.0
      • strip-ansi@^3.0.1
        • ansi-regex@^2.0.0
      • wrap-ansi@^2.0.0
        • string-width@^1.0.1
          • code-point-at@^1.0.0
            • number-is-nan@^1.0.0
          • is-fullwidth-code-point@^1.0.0
            • number-is-nan@^1.0.0
          • strip-ansi@^3.0.0
            • ansi-regex@^2.0.0
    • decamelize@^1.1.1
      • escape-string-regexp@^1.0.4
    • os-locale@^1.4.0
      • lcid@^1.0.0
        • invert-kv@^1.0.0
    • string-width@^1.0.1
      • code-point-at@^1.0.0
        • number-is-nan@^1.0.0
      • is-fullwidth-code-point@^1.0.0
        • number-is-nan@^1.0.0
      • strip-ansi@^3.0.0
        • ansi-regex@^2.0.0
    • window-size@^0.1.4
    • y18n@^3.2.0
  • chalk@~1.0.0
    • ansi-styles@^2.0.1
    • escape-string-regexp@^1.0.2
    • has-ansi@^1.0.3
      • ansi-regex@^1.1.0
      • get-stdin@^4.0.1
    • strip-ansi@^2.0.1
      • ansi-regex@^1.0.0
    • supports-color@^1.3.0

It apparently has quite old graceful-fs@~1.2.0 as a quite deep dependency (on the 7th level, if I'm not mistaken). What should we do about it?

Setting the exit code

I am maintaining an app that relies on the exit code to change based on certain conditions, even though the nw app itself closes cleanly, as it is spawned by a parent process that monitors it. Currently we've an older version of node-webkit forked with the following change and I'm trying to upgrade. Do you have any desire for a PR that changes

bin/nw:

 // Spawn node-webkit
  var nw = spawn(bin, args, { stdio: 'inherit' });
  nw.on('close', function() {
    process.nextTick(function() {
      process.exit(0);
    });
  });

to

  // Spawn node-webkit
  var nw = spawn(bin, args, { stdio: 'inherit' });
  nw.on('close', function(code) {
    process.nextTick(function() {
      process.exit(code);
    });
  });

Better yet if there's a way to achieve this with the existing code that would be great too. My problem is maintaining a downstream fork that will make this simple change every time there is a release of this repository.

npm install -g nw not working

OS: macOS 10.13.2
sudo npm install -g nw spawns an error even after repeated tries.
2018-01-08T09_28_36_151Z-debug.log
CLI output:

sudo npm install -g nw
/usr/local/bin/nw -> /usr/local/lib/node_modules/nw/bin/nw
> [email protected] postinstall /usr/local/lib/node_modules/nw
> node scripts/install.js

EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nw/nwjs'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/varunramg/.npm/_logs/2018-01-08T09_28_36_151Z-debug.log

HTTPS downloads

Would it be possible to download the nw.js binaries over HTTPS? Alternatively, could they be cryptographically verified after download? I often work in coffee shops with an insecure network connection, so I'm concerned that updating the nw package could open up my computer to exploits.

Thanks!
Tim

"nw" script points to non-existent nw binary

I have tried to install the nw binary with the nw installer several times. It'a has been successful, however, I can't get either the local, nor the global nw script to run. I keep getting an ENOENT error:

Error: spawn /usr/local/lib/node_modules/nw/nwjs/nwjs.app/Contents/MacOS/nwjs ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)

the path the script is trying to use is not correct. The same error results either trying to run npm start script indicated in package.json, and also when i use the nw command while in the project.

Unable to install [email protected]

I am unable to install nodewebkit 0.10.5 on Ubuntu Linux.

my-app git:(master) npm install [email protected]

> [email protected] postinstall /home/agirorn/code/my-app/node_modules/nodewebkit
> node scripts/install.js

stream.js:74
      throw er; // Unhandled stream error in pipe.0.5-linux-x64.tar.gz [          ] 0 %
      ^

Error: invalid tar file
    at Extract.Parse._startEntry (/home/agirorn/code/my-app/node_modules/tar/lib/parse.js:145:13)
    at Extract.Parse._process (/home/agirorn/code/my-app/node_modules/tar/lib/parse.js:127:12)
    at BlockStream.<anonymous> (/home/agirorn/code/my-app/node_modules/tar/lib/parse.js:47:8)
    at emitOne (events.js:77:13)
    at BlockStream.emit (events.js:169:7)
    at BlockStream._emitChunk (/home/agirorn/code/my-app/node_modules/block-stream/block-stream.js:145:10)
    at BlockStream.resume (/home/agirorn/code/my-app/node_modules/block-stream/block-stream.js:58:15)
    at Extract.Reader.resume (/home/agirorn/code/my-app/node_modules/fstream/lib/reader.js:255:34)
    at DirWriter.<anonymous> (/home/agirorn/code/my-app/node_modules/tar/lib/extract.js:57:8)
    at emitNone (events.js:67:13)
npm WARN @nls/[email protected] No repository field.
npm WARN @nls/[email protected] No license field.
npm ERR! Linux 4.4.0-53-generic
npm ERR! argv "/home/agirorn/.nvm/versions/node/v4.7.0/bin/node" "/home/agirorn/.nvm/versions/node/v4.7.0/bin/npm" "install" "[email protected]"
npm ERR! node v4.7.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nodewebkit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs nodewebkit
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls nodewebkit
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/agirorn/code/my-app/npm-debug.log
➜  my-app git:(master) 

npm-debug.log does not exits.

I am able to download http://dl.node-webkit.org/v0.10.5/node-webkit-v0.10.5-linux-x64.tar.gz in a browser.

http://dl.node-webkit.org/v0.10.5/node-webkit-v0.10.5-linux-x64.tar.gz seems to have been moved to http://dl.nwjs.io/v0.10.5/node-webkit-v0.10.5-linux-x64.tar.gz

my-app git:(master) curl -I http://dl.node-webkit.org/v0.10.5/node-webkit-v0.10.5-linux-x64.tar.gz
HTTP/1.1 301 Moved Permanently
Date: Tue, 20 Dec 2016 15:15:25 GMT
Server: Apache/2.2.22 (Debian)
Location: http://dl.nwjs.io/v0.10.5/node-webkit-v0.10.5-linux-x64.tar.gz
Vary: Accept-Encoding
Content-Type: text/html; charset=iso-8859-1

My guess is that the install can't handle the redirect.

Crash during startup on Win10 x64

installed it locally, nw build in package.json crashed and when installed globally running it via nw . it crashes.
Both with TypeError: Cannot read property 'split' of undefined

stdout:
TypeError: Cannot read property 'split' of undefined at module.exports (C:\Users\Andy\AppData\Roaming\npm\node_modules\nwjs\lib\old-version.js:2:19) at module.exports (C:\Users\Andy\AppData\Roaming\npm\node_modules\nwjs\lib\get-path.js:10:26) at Command.module.exports (C:\Users\Andy\AppData\Roaming\npm\node_modules\nwjs\lib\run.js:16:16) at Command.listener (C:\Users\Andy\AppData\Roaming\npm\node_modules\nwjs\node_modules\commander\index.js:300:8) at emitOne (events.js:115:13) at Command.emit (events.js:210:7) at Command.parseArgs (C:\Users\Andy\AppData\Roaming\npm\node_modules\nwjs\node_modules\commander\index.js:637:12) at Command.parse (C:\Users\Andy\AppData\Roaming\npm\node_modules\nwjs\node_modules\commander\index.js:457:21) at Object.<anonymous> (C:\Users\Andy\AppData\Roaming\npm\node_modules\nwjs\nw:64:18) at Module._compile (module.js:624:30)

Using it downloaded from the website works.

Forced install on first run.

When bin/nw starts it is trying to find the binary if it can't find it starts downloading the binary. This is so intrusive and not what you expect from starting nw. In my opinion the install should be responsible for installing the binary. And when you run nw and there is some dependency missing the app should just stop and show an error.

node scripts/install.js not working behind proxy

Environment:

  • Windows 7x64
  • HTTP_PROXY and HTTPS_PROXY environment variabes are set and confirmed to work with npm
  • node 4.5.0
$ npm version
{ npm: '4.4.1',        
  ares: '1.10.1-DEV',  
  http_parser: '2.7.0',
  icu: '56.1',         
  modules: '46',       
  node: '4.5.0',       
  openssl: '1.0.2h',   
  uv: '1.9.1',         
  v8: '4.5.103.37',    
  zlib: '1.2.8' }      

package.json file

{
  "devDependencies": {
    "nw": "^0.21.3",
    "nw-builder": "^3.2.0"
  }
}

Error message:

> [email protected] postinstall e:\tmp\nw-testarea\node_modules\nw
> node scripts/install.js

tunneling socket could not be established, statusCode=403
npm WARN nw-testarea No description
npm WARN nw-testarea No repository field.
npm WARN nw-testarea No license field.
npm WARN Error: EPERM: operation not permitted, scandir 'e:\tmp\nw-testarea\node_modules\parse-glob\node_modules'
npm WARN     at Error (native)
npm WARN  { [Error: EPERM: operation not permitted, scandir 'e:\tmp\nw-testarea\node_modules\parse-glob\node_modules']
npm WARN   errno: -4048,
npm WARN   code: 'EPERM',
npm WARN   syscall: 'scandir',
npm WARN   path: 'e:\\tmp\\nw-testarea\\node_modules\\parse-glob\\node_modules' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node scripts/install.js'.

Apparently this was initially reported as #12 and #15 and fixed with #16, but then regressed by #45

Set devDep to latest SDK

Here's a table of commands I can run, and the resulting devDependency in package.json.

Command Package.json
npm install --save-dev [email protected] "nw": "^0.13.3"
npm install --save-dev [email protected] "nw": "^0.13.3-sdk"
npm install --save-dev nw@latest "nw": "^0.29.3"
npm install --save-dev nw@latest-sdk npm ERR! code ETARGET No matching version found
npm install --save-dev nw@sdk "nw": "^0.29.3-sdk"

Because I've always installed it with nw@[version number]-sdk or nw@latest, I assumed that nw@latest-sdk was how to get the latest sdk version, and this has never worked, so I always just go to nwjs.io and look at what the latest version number is for the sdk manually.

It wasn't until making this issue that I thought to try out just nw@sdk. This seems to be missing from the documentation, and a feature I've been wanting for years and just didn't know it was there.

Older versions?

Using npm view nw versions I only get:

[ '0.12.0-alpha1', '0.12.0-alpha2' ]

Are older versions not supported? Not even the latest stable release (0.11.6)?
Or is there something wrong with my npm?

Show proper failure message on error in install.js

Currently while installing with npm install nw, if some error occurs in install.js it shows a single plain-text message and continues silently. In my case, i got "connect ECONNREFUSED". I had to actually look for some error in the output.

This behavior is highly misleading. It would be useful to give proper failure message on such cases.

npm audit: Downloads resourses over HTTP on Ubuntu 16.04 LTS

4.13.0-41-generic #46~16.04.1-Ubuntu SMP Thu May 3 10:06:43 UTC 2018 x86_64
NodeJS v9.11.1
NPM 6.0.1

To reproduce the problem
npm init
npm i nw result:

[email protected] postinstall /home/trofivan/Projects/myq-jobs-archive-parser/node_modules/nw
node scripts/install.js

added 236 packages from 121 contributors in 18.665s
[!] 1 vulnerability found [763 packages audited]
Severity: 1 High
Run npm audit for more detail

npm audit result:
image
More Info link: https://nodesecurity.io/advisories/166

package.json dependencies

...
"dependencies": {
  "nw": "^0.30.2"
}
...

In node_modules/nw/scripts/install.js using https:

...
var urlBase = process.env.npm_config_nwjs_urlbase || process.env.NWJS_URLBASE ||  'https://dl.nwjs.io/v';
...

npm install [email protected] not working

C:\example>npm install --save-dev [email protected]
npm ERR! code ETARGET
npm ERR! notarget No matching version found for [email protected]
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
C:\example>npm install --save-dev [email protected]
npm ERR! code ETARGET
npm ERR! notarget No matching version found for [email protected]
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

premature 0.14.0

I have accidentally published normal (c66bd2e) and SDK (3218266) versions of nw package version 0.14.0 before the corresponding version of NW.js is actually released.

I have quickly resolved this issue by unpublishing these two versions (otherwise npm install nw without a specific version might yield an unexpected error 404).

However, because npm does not allow to republish packages that were once unpublished, these packages would have to have -1 postfix to their versions in the future.

Publish 0.12.3 release

Sorry for opening this issue so quickly after the recent release. I realize that we are human and shouldn't be rushed. This is mostly for me tracking the progress of the next release.

On Jul 31, [email protected] was released. I was wondering if we could get a new release of npm-installer for that version?

https://groups.google.com/forum/#!msg/nwjs-general/hhXCS4aXGV0/TUQmcu5XDwAJ

For reference, we would like the patches for plaidchat/plaidchat#100 since it looks like 0.12.3 is including libffmpegsumo.so now (which Google Chrome/Chromium has stopped bundling yet we need for audio notifications).

Failed postinstall script on debian based distros

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.10
npm install nw -g
> [email protected] postinstall /usr/local/lib/node_modules/nw
> node scripts/install.js

sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"

The upstream name for the Node.js interpreter command is "node".
In Debian the interpreter command has been changed to "nodejs".

This was done to prevent a namespace collision: other commands use
the same name in their upstreams, such as ax25-node from the "node"
package.

Scripts calling Node.js as a shell command must be changed to instead
use the "nodejs" command.

Installation script fails behind proxy

The script install.js which runs on installation fails downloading from http://dl.nwjs.io/v* behind proxy.

both $http_proxy shell variable and npm config proxy are set properly.

Probably problem with the download package that is being used, which uses a package called got which apparently does not support proxy like this.

It would be great if we can fix this. I am ready to assist if I can be useful.

Thanks.

Add command to install chromedriver

The current setup for testing is a bit tedious. It would be nice if we could automate chromedriver installation similarly to how simple nw is. For example:

npm install nw
nw-installer install chromedriver

Install [email protected] fails on OSX Sierra

Installing nw with command npm install nw hanged at node scripts/install.js for around 1 hour, and returned following error message log:

> node scripts/install.js

end of central directory record signature not found
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "nw"
npm ERR! node v6.9.4
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nw package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs nw
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls nw
npm ERR! There is likely additional logging output above.

There is no proxy set up in my machine, so it's unlikely network problem.

ELIFECYCLE issue on MAC

*Trying this command on MAC
*
sudo npm install -g nw

*Getting the below errors -
*
/usr/local/bin/nw -> /usr/local/lib/node_modules/nw/bin/nw

[email protected] postinstall /usr/local/lib/node_modules/nw
node scripts/install.js

connect ECONNREFUSED 107.170.237.181:80

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "nw"
npm ERR! node v5.10.1
npm ERR! npm  v3.8.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nw package,
npm ERR! not with npm itself.

Download version / proxy issues

Hi,

The download npm package that npm-installer uses is currently ^3.3.0. That version uses its own proxy detection:

https://github.com/kevva/download/blob/v3.3.0/index.js#L33

The current version of download, 4.1.2, uses caw and get-proxy to detect proxy settings; they are different:

https://github.com/kevva/get-proxy/blob/master/index.js#L6

For me, this is an issue as I have a default proxy in my .npmrc and often override it via the command line. Upgrading to 4.1.2 allows me to at least use an environment variable to override the value in my .npmrc. There is a separate issue that I believe get-proxy should detect proxies set as command line arguments, but I'll submit an issue in that project.

Thanks!

Albert

0.11.6 is missing

I can't install 0.11.6 with the old nodewebkit package or this. I don't want 0.12-alpha (I assume it's not ready).

Choosing 32bit nw.exe

How can i choose which architecture of node-webkit to use/download/run ? on my 64bit machine it always defaults to 64bit.

Integrity protection for NW.js downloads

Currently, this installer downloads the NW.js binaries over insecure HTTP, leaving them open to malicious tampering (your computer could get pwned). Ideally, the binaries would have PGP signatures (pending nwjs/nw.js#3071) that could be verified, or would be available over HTTPS (pending nwjs/nw.js#3062).

I'd like to suggest an alternative that would be fairly simple to implement in the meantime. The autobump script could calculate the SHA-2 hash for each NW.js archive and save these hashes to package.json. When the install script runs, it could verify the downloaded file against the appropriate hash. It wouldn't be quite NSA-proof, but it would be a lot better than nothing.

If you're OK with this, I think I could put together a pull request with these changes sometime this week.

Cheers,
Tim

Postinstall freeze on OSX Yosemite - 10.10.3

When trying to install nw, the download is is ok but when it is running the post install, the process freezes and nothing happens. Error is below:

[email protected] postinstall /Users/radu.paraschiv/_playground/presentation/NW-Presentation/node_modules/nw
node scripts/install.js

Allow to install multiple binaries

Greetings,

Along with some modifications to nwjs/nw-builder, may I suggest to allow multiple binaries residing in the same node_module?
A structure following the one with nw-builder like ./nwjs/win32/, ./nwjs/win64/, ./nwjs/osx64/, ./nwjs/linux32/, etc.

Modifying npm-installer/lib/findpath.js to something like this could be done (Maybe adjust for a fallback on 32-bit for a 64-bit OS having only the 32-bit version installed)

var fs = require('fs');
var path = require('path');
var bindir = path.resolve(__dirname, '..', 'nwjs');

module.exports = function() {
  var bin = bindir;
  var arch = process.arch;
  var platform = process.platform;
  if (arch === 'ia32') {
    arch = '32';
  } else if (arch === 'x64'){
    arch = '64';
  }
  if (process.platform === 'darwin') {
    platform = 'osx';
    if (fs.existsSync(path.join(bin, platform + arch, 'Contents'))) {
      bin = path.join(bin, platform + arch, 'Contents', 'MacOS', 'nwjs');
    } else {
      bin = path.join(bin, platform + arch, 'nwjs.app', 'Contents', 'MacOS', 'nwjs');
    }
  } else if (process.platform === 'win32') {
    platform = 'win';
    bin = path.join(bin, platform + arch, 'nw.exe');
  } else {
    bin = path.join(bin, platform + arch, 'nw');
  }
  return bin;
}

Why do I suggested this?

I'm currently on a situation that I have a shared application on a network and the environment is now having both Windows and MacOSX. Doing as suggested could allow us to keep having one unique place for our application and this avoid us to duplicate the procedures, shortcuts & application updates for each platform.

So the main advantages are:

  • Possibility to deploy/install for multiple supported platforms from a single installation (All-in-one / portable);
  • Allow to avoid duplication of an entire application just due to platform constraint with NW.js binaries;
  • Still be compatible with the usual way with one platform at the time for lighter redistribution or any other platform restriction reason.

Thanks!

nw bin script has CRLF endings

nw bin script has CRLF endings after installing nw from npm, thus making it impossible to run it without conversion on Linux:

$ npm i [email protected]
$ file -L node_modules/.bin/nw
node_modules/.bin/nw: Node.js script, ASCII text executable, with CRLF line terminators
$ node_modules/.bin/nw 
: No such file or directory
$ dos2unix -F node_modules/.bin/nw
dos2unix: converting file node_modules/.bin/nw to Unix format...
$ node_modules/.bin/nw
[0207/192912:INFO:nw_package.cc(175)] ...runs ok

Could you please use LF endings for this file?

Binary and npm package name?

Currently I have the npm package name as: nwjs but we could probably ask for nw, if desired, as it appears to be an empty package. Or another name?

I also currently have the binary named nwjs. I'm a fan of having the binary name be the same as the package name but it can really be named anything as well.

/cc @rogerwang

Crash on macOS during start

After upgrading to 0.22.0-sdk nw is crashing on start on macOS Sierra 10.12.4, showing the following dialog:

screenshot 2017-04-20 15 33 41

Here is what I have in the console:

npm install -g [email protected]
/usr/local/bin/nw -> /usr/local/lib/node_modules/nw/bin/nw

> [email protected] postinstall /usr/local/lib/node_modules/nw
> node scripts/install.js

/usr/local/lib
└── [email protected]
nw --version
dlopen /usr/local/lib/node_modules/nw/nwjs/nwjs.app/Contents/MacOS/../Versions/58.0.3029.81/nwjs Framework.framework/nwjs Framework: dlopen(/usr/local/lib/node_modules/nw/nwjs/nwjs.app/Contents/MacOS/../Versions/58.0.3029.81/nwjs Framework.framework/nwjs Framework, 257): no suitable image found.  Did find:
	/usr/local/lib/node_modules/nw/nwjs/nwjs.app/Contents/MacOS/../Versions/58.0.3029.81/nwjs Framework.framework/nwjs Framework: file too short
	/usr/local/lib/node_modules/nw/nwjs/nwjs.app/Contents/Versions/58.0.3029.81/nwjs Framework.framework/nwjs Framework: file too short

Fails to install on Raspbian

Operating System:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.1 (stretch)
Release: 9.1
Codename: stretch

node and npm versions:

$ npm -v
5.6.0
$ node -v
v7.10.1

Steps to reproduce:

$ sudo npm install -g nw

Expected to install peacefully, actual behavior:

$ sudo npm install -g nw
/usr/bin/nw -> /usr/lib/node_modules/nw/bin/nw

[email protected] postinstall /usr/lib/node_modules/nw
node scripts/install.js

Response code 404 (Not Found)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-12-28T16_51_24_473Z-debug.log

Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.