Giter VIP home page Giter VIP logo

nodewebkit's Introduction

nodewebkit Build Status

An installer for node-webkit.

node-webkit is an app runtime based on Chromium and node.js. For building desktop applications that will run on OSX, Windows and Linux.

NPM

ATTENTION

node-webkit was renamed to nw.js as of version 0.12.0.
The new and official installer for nw.js is now npm install nw and the repo is located at github.com/nwjs/npm-installer

All future releases >= 0.12.0 will be released through nw.

usage

Install locally to your project with: npm install nodewebkit and then in your package.json add a script:

{
  "scripts": {
    "start": "nodewebkit"
  }
}

Now it will run your local project when you type npm start.

If your project is in another folder, add the path to the project "start": "nodewebkit path/to/app".

You could also call the binary directly with node_modules/.bin/nodewebkit instead of adding to your package.json.

global

You can also install globally with npm install nodewebkit -g and then in any project type nodewebkit to run the project. Installing locally is recommended though as each project can have its own dependent version of node-webkit.

example

If you want a really quick example try this:

  1. git clone https://github.com/zcbenz/nw-sample-apps && cd nw-sample-apps
  2. npm install nodewebkit
  3. "node_modules/.bin/nodewebkit" file-explorer

and now you should see a file explorer demo app.

command line options

There are a few (platform-specific) arguments you can pass to the nodewebkit executable to customize your node-webkit application:

  • --mac_plist <path-to-plist-file>: (OS X only) Copies the given file to Info.plist in the app bundle. This lets you do things like change your app's name and point to a different icon.

  • --mac_icon <path-to-icns-file>: (OS X only) Copies the given .icns file to the Resources/ dir in the app bundle. You will need to point to the file with a custom plist file as well (see --mac_list)

NOTE: These options will keep the copied files in the app bundle for as long as the bundle is on the filesystem (they're not deleted between app invocations). As a result, they're not recommended if you installed nodewebkit globally using -g. Also note that OS X caches these files, so you may need to manually clear these cached files during development.

install a specific version of node-webkit

To install a spcific version of node-webkit use npm with the specific version: npm install [email protected]

Please note: This npm package version tracks the version of node-webkit that will be installed, with an additional build number that is used for revisions to the installer. As such 0.9.2-1 and 0.9.2-2 will both install [email protected] but the latter has newer changes to the installer.

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

finding the path to the node-webkit binary

If you would like to programmatically retrieve the path to the node-webkit binary use:

var findpath = require('nodewebkit').findpath;
var nwpath = findpath();
// nwpath will equal the path to the binary depending on your environment

using a proxy with or without authentication

If you are behind a proxy server you have to set an environment variable http_proxy with proxy servers url:

export http_proxy="http://username:[email protected]:8080"

or

export http_proxy="http://myproxy.com:8080"

license

node-webkit's code and this installer use the MIT license.

nodewebkit's People

Contributors

adam-lynch avatar af avatar ayapi avatar fweinb avatar lostfictions avatar max-mapper avatar merqlove avatar mithgol avatar seeekr avatar shama avatar ssilence 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

nodewebkit's Issues

gui.App.argv and gui.App.fullArgv are always empty

By some reason I cannot pass any argvs to my node-webkit app, they are always empty..

nodewebkit myapp --debug

returns empty array for both gui.App.argv and gui.App.fullArgv

but when I start my app with just executable

node-webkit.app/Contents/MacOS/node-webkit myapp

argvs are OK.

So I assume the problem is in your module's bin file..

nodejs engine

Since node-webkit comes with the nodejs included, the engine entry in the package.json produces some false warnings when the node version installed on the system doesn't meet the version that is in the engine version.

The only role that node has is being the script wrapper in the bin directory to start the actual node-webkit binary. For sure that will also work with a slightly older version of node. So perhaps at least allow for node 0.10 versions ?

writeStream "finish" doesn't fire

Downloading http://s3.amazonaws.com/node-webkit/v0.7.5/node-webkit-v0.7.5-linux-x64.tar.gz...
execvp(): No such file or directory

Seems like after http.get is completed, script/install.js terminates without trying to extract archive.

GamePad

Hi,

I'm having an issue with obtaining gamepad information. Using the following code..

var gamepadSupportAvailable = !!navigator.webkitGetGamepads || !!navigator.webkitGamepads;

        if (gamepadSupportAvailable) {

            var gamepads = navigator.getGamepads();

            for (var i = 0; i < gamepads.length; i++) {
                var pad = gamepads[i];

                console.log(pad);
           }

...pad is undefined. 'gamepads.length' is 4. This code is called every 100 milliseconds by the setInterval function. I have activated the controller by pressing buttons and moving the joySticks. This works in my Chrome browser.

Thanks in advance for any help you can give.

Cheers

Installing node-webkit-v0.9.2-win-ia32 fails

Probably because of a wrong URL.

[email protected] postinstall C:\Development\WebstormProjects\btclip\node_modules\nodewebkit
node scripts/install.js

Downloading http://s3.amazonaws.com/node-webkit/v0.9.2/node-webkit-v0.9.2-win-ia32.zip...
Finish downloading. Extracting...

C:\Development\WebstormProjects\btclip\node_modules\nodewebkit\node_modules\zip\zip.js:281
throw new Error("ZIP end of central directory record signature invalid
^
Error: ZIP end of central directory record signature invalid (expects 0x06054b50, actually 0x6d783f3c)
at Reader.readEndOfCentralDirectoryRecord (C:\Development\WebstormProjects\btclip\node_modules\nodewebkit\node_modules\zip\zip.j
s:281:15)
at Reader.iterator (C:\Development\WebstormProjects\btclip\node_modules\nodewebkit\node_modules\zip\zip.js:317:28)
at Reader.forEach (C:\Development\WebstormProjects\btclip\node_modules\nodewebkit\node_modules\zip\zip.js:351:25)
at WriteStream. (C:\Development\WebstormProjects\btclip\node_modules\nodewebkit\scripts\install.js:51:12)
at WriteStream.EventEmitter.emit (events.js:117:20)
at finishMaybe (_stream_writable.js:360:12)
at afterWrite (_stream_writable.js:280:5)
at onwrite (_stream_writable.js:270:7)
at WritableState.onwrite (_stream_writable.js:97:5)
at fs.js:1683:5
npm ERR! [email protected] postinstall: node scripts/install.js
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! 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 their info via:
npm ERR! npm owner ls nodewebkit
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! cwd C:\Development\WebstormProjects\btclip
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Development\WebstormProjects\btclip\npm-debug.log
npm ERR! not ok code 0

install error

Install error win 7 64 bit

[email protected] postinstall n:\nodejs\gui\node_modules\nodewebkit
node scripts/install.js

Downloading http://dl.node-webkit.org/v0.8.5/node-webkit-v0.8.5-win-ia32.zip...
Finish downloading. Extracting...

n:\nodejs\gui\node_modules\nodewebkit\node_modules\zip\zip.js:245
throw new Error("Unable to find end of central directory record");
^
Error: Unable to find end of central directory record
at Reader.locateEndOfCentralDirectoryRecord (n:\nodejs\gui\node_modules\nodewebkit\node_modules\zip\zip.js:245:19)
at Reader.iterator (n:\nodejs\gui\node_modules\nodewebkit\node_modules\zip\zip.js:316:12)
at Reader.forEach (n:\nodejs\gui\node_modules\nodewebkit\node_modules\zip\zip.js:351:25)
at WriteStream. (n:\nodejs\gui\node_modules\nodewebkit\scripts\install.js:52:12)
at WriteStream.EventEmitter.emit (events.js:117:20)
at finishMaybe (_stream_writable.js:360:12)
at endWritable (_stream_writable.js:367:3)
at WriteStream.Writable.end (_stream_writable.js:345:5)
at IncomingMessage.onend (_stream_readable.js:483:10)
at IncomingMessage.g (events.js:180:16)

Error regarding libudev.so.0 (?)

Hi!

I'm having trouble using your package on Ubuntu (13.10 and now 14.04). I created a gist (https://gist.github.com/jeancarlozapata/11166039) with code and instructions to reproduce the problem.

The error says something like this (full code on the gist):

/home/caramba/code/nodewebkit/hello/node_modules/nodewebkit/nodewebkit/nw: error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory

Any ideas about what could be going on here? Anyone else having this problem in particular?

Thanks in advance, and keep up the good job on this package 👍

EDIT: added more info

node -v
node v0.10.26

which node
/usr/bin/node

npm -v
1.4.3

which npm
/usr/bin/npm

Issue on debian

x@y:~/project/nw-app$ ~/project/node_modules/nodewebkit/nodewebkit/nw .
/home/x/project/node_modules/nodewebkit/nodewebkit/nw: error while loading shared libraries: libnotify.so.4: cannot open shared object file: No such file or directory

I'm not very familiar with Linux, is this an issue with my distro or with nodewebkit installer?

Installation of v0.9.2 failing on Mac OS X

I'm trying to install version 0.9.2 of node-webkit by running npm install -g [email protected], but it seems to fail when trying to download the non-existent file http://s3.amazonaws.com/node-webkit/v0.9.2/node-webkit-v0.9.2-osx-ia32.zip.

This is the full error message:

/usr/local/lib/node_modules/nodewebkit/node_modules/zip/zip.js:281
        throw new Error("ZIP end of central directory record signature invalid
              ^
Error: ZIP end of central directory record signature invalid (expects 0x06054b50, actually 0x6d783f3c)
    at Reader.readEndOfCentralDirectoryRecord (/usr/local/lib/node_modules/nodewebkit/node_modules/zip/zip.js:281:15)
    at Reader.iterator (/usr/local/lib/node_modules/nodewebkit/node_modules/zip/zip.js:317:28)
    at Reader.forEach (/usr/local/lib/node_modules/nodewebkit/node_modules/zip/zip.js:351:25)
    at WriteStream.<anonymous> (/usr/local/lib/node_modules/nodewebkit/scripts/install.js:51:12)
    at WriteStream.emit (events.js:117:20)
    at finishMaybe (_stream_writable.js:360:12)
    at afterWrite (_stream_writable.js:280:5)
    at onwrite (_stream_writable.js:270:7)
    at WritableState.onwrite (_stream_writable.js:97:5)
    at fs.js:1688:5

Error during installation on Windows 8 x64

An error occurs when I try to install this module with NPM on Windows 8 x64... How can I fix it?

> node scripts/install.js


Error: EINVAL, invalid argument
    at new Socket (net.js:156:18)
    at process.stdin (node.js:664:19)
    at module.exports (C:\Users\MainAccount\Documents\Projects\node-slack\node_modules\nodewebkit\node_modules\multimeter\node_modules\charm\index.js:22:21)
    at module.exports (C:\Users\MainAccount\Documents\Projects\node-slack\node_modules\nodewebkit\node_modules\multimeter\index.js:9:29)
    at Object.<anonymous> (C:\Users\MainAccount\Documents\Projects\node-slack\node_modules\nodewebkit\scripts\install.js:5:38)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
npm ERR! [email protected] postinstall: `node scripts/install.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! 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 their info via:
npm ERR!     npm owner ls nodewebkit
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\MainAccount\Documents\Projects\node-slack
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE

> [email protected] install C:\Users\MainAccount\Documents\Projects\node-slack\node_modules\gulp-sass\node_modules\node-sass
> node build.js

`win32-x64-v8-3.14` exists; testing

npm install fails

I'm not sure why this is happening on only some of my computers, but..


c:\Users\Rahat\Git\google-play-music-wrapper\node_modules\nodewebkit\node_modules\download\index.js:70
            if (opts.extract && (decompress.canExtract(opts.url, mime) || opts
                                            ^
TypeError: Object function Decompress() {
    this.ware = new Ware();
} has no method 'canExtract'
    at Request.<anonymous> (c:\Users\Rahat\Git\google-play-music-wrapper\node_modules\nodewebkit\node_modules\download\index.js:70:45)
    at Request.EventEmitter.emit (events.js:95:17)
    at Request.onResponse (c:\Users\Rahat\Git\google-play-music-wrapper\node_modules\nodewebkit\node_modules\request\request.js:986:10)
    at ClientRequest.g (events.js:175:14)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1669:21)
    at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:120:23)
    at Socket.socketOnData [as ondata] (http.js:1564:20)
    at TCP.onread (net.js:525:27)
npm ERR! weird error 8
npm ERR! not ok code 0

Seems to happen due to a stupid bug in newer versions of the package download which calls canExtract on the package decompress, but decompress doesn't have that function in its newer versions. Solution is to use download version < 0.1.14 I think?

issue with version 0.9.2

error displayed:

Cannot extract package

Failed to unzip the package file: C:\Warehouse\node

I am running this with nodewebkit and/or npm start. I have tried with nodewebkit -g then nodewebkit in the directory (I am not using a zip file, the options are added to package.json). It was working with 0.8.3 just fine.

my package.json is

{
"name": "warehouse",
"private": true,
"version": "0.0.0",
"description": "Warehouse Project",
"dependencies": {
"sails": "0.9.9",
"grunt": "0.4.1",
"sails-disk": "~0.9.0",
"ejs": "0.8.4",
"optimist": "0.3.4",
"jsonfile": "~1.1.1",
"jsesc": "~0.4.3",
"edge-ps": "0.1.0-pre",
"JSONSelect": "git+https://github.com/lloyd/JSONSelect",
"passport": "~0.2.0",
"passport-google-oauth": "~0.1.5",
"passport-facebook": "~1.0.2",
"passport-github": "~0.1.5",
"emailjs": "~0.3.6",
"forever": "~0.10.11",
"xlsjs": "~0.6.8",
"nodemon": "~1.0.14",
"xlsx": "~0.5.8",
"nodewebkit": "~0.9.2",
"edge": "~0.7.14",
"sails-mongo": "~0.9.7",
"bcryptjs": "~0.7.10",
"deep-diff": "~0.1.4",
"js-select": "~0.6.0"
},
"scripts": {
"start": "nodewebkit",
"debug": "node debug app.js"
},
"node-main": "app.js",
"main": "index.html",
"window": {
"show": "false",
"title": "Warehouse",
"toolbar": false,
"frame": true,
"width": 961,
"height": 662,
"position": "center"
},
"repository": "",
"author": "",
"license": ""
}

install error

/home/renyuan/node_modules/nodewebkit/node_modules/zip/zip.js:245
throw new Error("Unable to find end of central directory record");
^
Error: Unable to find end of central directory record
at Reader.locateEndOfCentralDirectoryRecord (/home/renyuan/node_modules/nodewebkit/node_modules/zip/zip.js:245:19)
at Reader.iterator (/home/renyuan/node_modules/nodewebkit/node_modules/zip/zip.js:316:12)
at Reader.forEach (/home/renyuan/node_modules/nodewebkit/node_modules/zip/zip.js:351:25)
at WriteStream. (/home/renyuan/node_modules/nodewebkit/scripts/install.js:43:10)
at WriteStream.EventEmitter.emit (events.js:117:20)
at finishMaybe (_stream_writable.js:352:12)
at afterWrite (_stream_writable.js:272:5)
at onwrite (_stream_writable.js:262:7)
at WritableState.onwrite (_stream_writable.js:97:5)
at fs.js:1681:5
unbuild [email protected]
npm ERR! weird error 8
npm ERR! not ok code 0

Error: Cannot find module 'C:\scripts\install.js'

Hello, I'm trying to install nodewebkit and I got the following error. I have the latest node.js version installed. Any help? thanks :)

node.js version: 0.10.31
npm: 1.4.23

C:\>npm install nodewebkit
|
> [email protected] postinstall C:\node_modules\nodewebkit
> node scripts/install.js


module.js:340
    throw err;
          ^
Error: Cannot find module 'C:\scripts\install.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3
npm ERR! [email protected] postinstall: `node scripts/install.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! 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 their info via:
npm ERR!     npm owner ls nodewebkit
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
 "nodewebkit"
npm ERR! cwd C:\
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\npm-debug.log
npm ERR! not ok code 0

Use patch versions?

Using ^0.9.2-5 in package.json will actually install 0.9.2 which doesn’t work anymore. It's unfortunate that semver works this way. And I understand that you probably want the version to match the official release's version.

Maybe there's some way to avoid this issue?

Please update to v0.10.1

Could you please add support for node-webkit version v0.10.1?

$ npm info nodewebkit versions
npm http GET https://registry.npmjs.org/nodewebkit
npm http 200 https://registry.npmjs.org/nodewebkit

[ '0.7.3',
  '0.7.4',
  '0.7.5-1',
  '0.7.5-2',
  '0.7.5-3',
  '0.7.5',
  '0.8.0',
  '0.8.1',
  '0.8.2-1',
  '0.8.2',
  '0.8.4-1',
  '0.8.4-2',
  '0.8.4',
  '0.8.5-1',
  '0.8.5-2',
  '0.8.5-3',
  '0.8.5-4',
  '0.8.5-5',
  '0.8.5',
  '0.8.6-1',
  '0.8.6-2',
  '0.8.6-3',
  '0.8.6',
  '0.9.2-1',
  '0.9.2-2',
  '0.9.2-3',
  '0.9.2-4',
  '0.9.2-5',
  '0.9.2-6',
  '0.9.2-7',
  '0.9.2-8',
  '0.9.2',
  '0.10.0-rc1',
  '0.10.0-rc1-1',
  '0.10.0-rc1-2',
  '0.10.0-rc1-3',
  '0.10.0' ]

http://s3.amazonaws.com/node-webkit/v0.9.2/node-webkit-v0.9.2-osx-ia32.zip no longer exits

npm http 304 https://registry.npmjs.org/graceful-fs

> [email protected] postinstall /Users/gianpaj/tmp/storm/node_modules/nodewebkit
> node scripts/install.js

Downloading http://s3.amazonaws.com/node-webkit/v0.9.2/node-webkit-v0.9.2-osx-ia32.zip...
Finish downloading. Extracting...

/Users/gianpaj/tmp/storm/node_modules/nodewebkit/node_modules/zip/zip.js:281
        throw new Error("ZIP end of central directory record signature invalid
              ^
Error: ZIP end of central directory record signature invalid (expects 0x06054b50, actually 0x6d783f3c)
    at Reader.readEndOfCentralDirectoryRecord (/Users/gianpaj/tmp/storm/node_modules/nodewebkit/node_modules/zip/zip.js:281:15)
    at Reader.iterator (/Users/gianpaj/tmp/storm/node_modules/nodewebkit/node_modules/zip/zip.js:317:28)
    at Reader.forEach (/Users/gianpaj/tmp/storm/node_modules/nodewebkit/node_modules/zip/zip.js:351:25)
    at WriteStream.<anonymous> (/Users/gianpaj/tmp/storm/node_modules/nodewebkit/scripts/install.js:51:12)
    at WriteStream.EventEmitter.emit (events.js:117:20)
    at finishMaybe (_stream_writable.js:360:12)
    at afterWrite (_stream_writable.js:280:5)
    at onwrite (_stream_writable.js:270:7)
    at WritableState.onwrite (_stream_writable.js:97:5)
    at fs.js:1683:5
npm ERR! [email protected] postinstall: `node scripts/install.js`
npm ERR! Exit status 8

Doesn't install on Windows

On windows I get an exception when I try to install nodewebkit (npm install nodewebkit):

> make
'make' is not recognized as an internal or external command,
operable program or batch file.

The reason is that the semver package has a pre-publish task defined that is using the make command (which on standard Windows isn't available). And somehow NPM decided in all its wisdom to run prepublish scripts as part of the install task :(

Possible I should raise this against semver package and not nodewebkit, but perhaps there is a work around?

error when running npm start- maybe a newbe problem

getting:
'nodewebkit' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! @ start: nodewebkit
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ start script.
npm ERR! This is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! nodewebkit
npm ERR! You can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! cwd C:\projects\nodeProject\clientNode\GuiClient
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\projects\nodeProject\clientNode\GuiClient\npm-debug.log
npm ERR! not ok code 0

my folder structure:
C:\projects\nodeProject\clientNode\GuiClient\node_modules\nodewebkit\bin
autobump
nodewebkit
both of type file

Proposed plan to remove complexity in the installer version handling

Problem Statement

Currently, when a new version of node-webkit is released, the package maintainers must release a new version of the nodewebkit installer in order for developers to use it in their applications. This creates the following problems:

  • This creates more work for the maintainers.
  • This means a longer wait for developers interested in obtaining the latest version, or it means they're forced to subvert this tool's normal install process.

I also don't work alone. We have non-technical and junior developers who test and contribute to the application, so something seemingly as simple as a wget to many of us in the open source world can feel complex and harrowing to such folks not immersed in the tech world. In short, subverting the install process reduces our productivity.

I propose the following improvement to reduce complexity:

Solution Overview

Instead of basing the version of nodewebkit off of the version of the installer, is it possible to modify the actual nodewebkit installer command line tool so that it runs independently of npm install. Using something like commander, would it be possible to read command line arguments? This eliminates the dependency on the installer version number.

Proposed Usage:

Step 1: Install the nodewebkit installer. This step doesn't install node-webkit! It only installs the installer:

$ npm install -g nodewebkit    # install the nodewebkit installer, but don't install nw yet.

Step 2: Invoke the installer with a command line argument, which tells the installer to download the correct version of node-webkit:

$ nodewebkit install 0.10.2

The install <version_number> arguments would do the following:

  • Detect the platform (osx-32, win-32, linux-32, etc).
  • Read the target version number from the argument list.
  • Download the target version and platform from http://dl.node-webkit.org and install it, using the existing, tried and tested process.

Possible Advantages:

The process of installing node-webkit is -- as a general rule -- the same from version to version. It's only the version number that differs. Modifying the process, as outlined, has the following benefits:

Possible Downside:

The potential downside to this approach is that it creates an additional step for those people installing dependencies via npm. They would run npm install to install their package.json dependencies, and then they would run the nodewebkit installer separately. However, this is still much simpler than manually grabbing node-webkit from the download server, especially when working with non-technical early-adopters and junior developers/testers.

Conclusion

I hope these ideas help improve this helpful tool. If this sounds like a good plan and is something you would support, I may be interested in contributing by forking and doing a pull request (if it isn't something you have time to do). Please let me know what you think!

nodewebkit takes far too long to install

This module hangs at 96% and takes around ~5 minutes while pegging cpu at 100% extracting and decompressing a file. If I use tar myself it takes 2 seconds:

$ time tar xzf node-webkit-v0.8.5-linux-x64.tar.gz 

real    0m2.040s
user    0m1.864s
sys 0m0.824s

I raised an issue upstream on the download module: kevva/download#11

Getting "connect ETIMEDOUT" on scripts/install.js behind a corporate proxy

I have to run npm through CNTLM to get around a corporate proxy/firewall (see http://stackoverflow.com/questions/18569054/npm-behind-ntlm-proxy), but it seems like this proxy setting is not being used by the nodewebkit installer, and it results in a "connect ETIMEDOUT" error during the postinstall step, specifically on:

node scripts/install.js

I was able to get it to work by modifying .\node_modules\nodewebkit\scripts\install.js to pass a proxy setting to the download module:

...
var d = download(url, dest, { extract: true, strip: 1, proxy: 'http://127.0.0.1:3128' });
...

Not sure if it's possible, but it would be great to pass in the npm proxy setting to this script if it's been set.

Unable to install [email protected]

I am unable to install nodewebkit 0.10.5 on Ubuntu Linux.I previously reported this in nwjs/npm-installer/issues/52

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) 

Can the installer for [email protected] be fixed to support redirect, or can http://dl.node-webkit.org be changed in a way that it serves the files needed to install nodewebkit instead of redirecting to http://dl.nwjs.io so that the installer continues to work as expected?

Problem while installing slack on windows 10

This error Log shown while i am trying to install slack

2015-11-19 09:51:02> Program: Starting Squirrel Updater: --install .
2015-11-19 09:51:02> Program: Starting install, writing to C:\Users\komal_2\AppData\Local\SquirrelTemp
2015-11-19 09:51:02> Program: About to install to: C:\Users\komal_2\AppData\Local\slack
2015-11-19 09:51:02> Program: Install path C:\Users\komal_2\AppData\Local\slack already exists, burning it to the ground
2015-11-19 09:51:02> IEnableLogger: Failed to remove existing directory on full install, is the app still running???: System.IO.IOException: The process cannot access the file 'C:\Users\komal_2\AppData\Local\slack\app-1.2.5\content_resources_200_percent.pak' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at System.IO.File.Delete(String path)
at Squirrel.Utility.b__34(String file)
at Squirrel.Utility.<>c__DisplayClass181.<>c__DisplayClass1a.<ForEachAsync>b__17() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<b__1d>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__3b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<b__35>d__38.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<<ForEachAsync>b__1d>d__22.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<DeleteDirectory>d__3b.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<LogIfThrows>d__4d.MoveNext() 2015-11-19 09:51:02> Unhandled exception: System.AggregateException: One or more errors occurred. ---> System.IO.IOException: The process cannot access the file 'C:\Users\komal_2\AppData\Local\slack\app-1.2.5\content_resources_200_percent.pak' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalDelete(String path, Boolean checkHost) at System.IO.File.Delete(String path) at Squirrel.Utility.<DeleteDirectory>b__34(String file) at Squirrel.Utility.<>c__DisplayClass181.<>c__DisplayClass1a.b__17()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<<ForEachAsync>b__1d>d__22.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<DeleteDirectory>d__3b.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<<DeleteDirectory>b__35>d__38.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<b__1d>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__3b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__4d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Update.Program.d__38.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Squirrel.Update.Program.executeCommandLine(String[] args)
at Squirrel.Update.Program.main(String[] args)
---> (Inner Exception #0) System.IO.IOException: The process cannot access the file 'C:\Users\komal_2\AppData\Local\slack\app-1.2.5\content_resources_200_percent.pak' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at System.IO.File.Delete(String path)
at Squirrel.Utility.b__34(String file)
at Squirrel.Utility.<>c__DisplayClass181.<>c__DisplayClass1a.<ForEachAsync>b__17() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<b__1d>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__3b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<b__35>d__38.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<>c__DisplayClass1e`1.<>c__DisplayClass20.<b__1d>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__3b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__4d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Update.Program.d__38.MoveNext()<---

2015-11-19 09:52:47> Program: Starting Squirrel Updater: --install .
2015-11-19 09:52:47> Program: Starting install, writing to C:\Users\komal_2\AppData\Local\SquirrelTemp
2015-11-19 09:52:47> Program: About to install to: C:\Users\komal_2\AppData\Local\slack
2015-11-19 09:52:47> Program: Install path C:\Users\komal_2\AppData\Local\slack already exists, burning it to the ground
2015-11-19 09:52:47> IEnableLogger: Failed to remove existing directory on full install, is the app still running???: System.IO.IOException: The process cannot access the file 'C:\Users\komal_2\AppData\Local\slack\app-1.2.5\content_resources_200_percent.pak' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at System.IO.File.Delete(String path)
at Squirrel.Utility.b__34(String file)
at Squirrel.Utility.<>c__DisplayClass181.<>c__DisplayClass1a.<ForEachAsync>b__17() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<b__1d>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__3b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<b__35>d__38.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<<ForEachAsync>b__1d>d__22.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<DeleteDirectory>d__3b.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<LogIfThrows>d__4d.MoveNext() 2015-11-19 09:52:47> Unhandled exception: System.AggregateException: One or more errors occurred. ---> System.IO.IOException: The process cannot access the file 'C:\Users\komal_2\AppData\Local\slack\app-1.2.5\content_resources_200_percent.pak' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalDelete(String path, Boolean checkHost) at System.IO.File.Delete(String path) at Squirrel.Utility.<DeleteDirectory>b__34(String file) at Squirrel.Utility.<>c__DisplayClass181.<>c__DisplayClass1a.b__17()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<<ForEachAsync>b__1d>d__22.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<DeleteDirectory>d__3b.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<<DeleteDirectory>b__35>d__38.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<b__1d>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__3b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__4d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Update.Program.d__38.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Squirrel.Update.Program.executeCommandLine(String[] args)
at Squirrel.Update.Program.main(String[] args)
---> (Inner Exception #0) System.IO.IOException: The process cannot access the file 'C:\Users\komal_2\AppData\Local\slack\app-1.2.5\content_resources_200_percent.pak' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at System.IO.File.Delete(String path)
at Squirrel.Utility.b__34(String file)
at Squirrel.Utility.<>c__DisplayClass181.<>c__DisplayClass1a.<ForEachAsync>b__17() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<b__1d>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__3b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<b__35>d__38.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<>c__DisplayClass1e`1.<>c__DisplayClass20.<b__1d>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__3b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__4d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Update.Program.d__38.MoveNext()<---

2015-11-19 09:53:33> Program: Starting Squirrel Updater: --install .
2015-11-19 09:53:33> Program: Starting install, writing to C:\Users\komal_2\AppData\Local\SquirrelTemp
2015-11-19 09:53:33> Program: About to install to: C:\Users\komal_2\AppData\Local\slack
2015-11-19 09:53:33> Program: Install path C:\Users\komal_2\AppData\Local\slack already exists, burning it to the ground
2015-11-19 09:53:33> IEnableLogger: Failed to remove existing directory on full install, is the app still running???: System.IO.IOException: The process cannot access the file 'C:\Users\komal_2\AppData\Local\slack\app-1.2.5\content_resources_200_percent.pak' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at System.IO.File.Delete(String path)
at Squirrel.Utility.b__34(String file)
at Squirrel.Utility.<>c__DisplayClass181.<>c__DisplayClass1a.<ForEachAsync>b__17() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<b__1d>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__3b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<b__35>d__38.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<<ForEachAsync>b__1d>d__22.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<DeleteDirectory>d__3b.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<LogIfThrows>d__4d.MoveNext() 2015-11-19 09:53:33> Unhandled exception: System.AggregateException: One or more errors occurred. ---> System.IO.IOException: The process cannot access the file 'C:\Users\komal_2\AppData\Local\slack\app-1.2.5\content_resources_200_percent.pak' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalDelete(String path, Boolean checkHost) at System.IO.File.Delete(String path) at Squirrel.Utility.<DeleteDirectory>b__34(String file) at Squirrel.Utility.<>c__DisplayClass181.<>c__DisplayClass1a.b__17()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<<ForEachAsync>b__1d>d__22.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<DeleteDirectory>d__3b.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<<DeleteDirectory>b__35>d__38.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<b__1d>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__3b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__4d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Update.Program.d__38.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Squirrel.Update.Program.executeCommandLine(String[] args)
at Squirrel.Update.Program.main(String[] args)
---> (Inner Exception #0) System.IO.IOException: The process cannot access the file 'C:\Users\komal_2\AppData\Local\slack\app-1.2.5\content_resources_200_percent.pak' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at System.IO.File.Delete(String path)
at Squirrel.Utility.b__34(String file)
at Squirrel.Utility.<>c__DisplayClass181.<>c__DisplayClass1a.<ForEachAsync>b__17() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.<>c__DisplayClass1e1.<>c__DisplayClass20.<b__1d>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__3b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<b__35>d__38.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.<>c__DisplayClass1e`1.<>c__DisplayClass20.<b__1d>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__3b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__4d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Update.Program.d__38.MoveNext()<---

Please use new official URL of node-webkit

Hello,

I'm changing the official download URL of node-webkit from s3.amazonaws.com to dl.node-webkit.org. Please change the URL in your package and upload a new version to npm repository. Thanks.

Roger

Allow installation of other node-webkit versions

I noticed when I installed this that it pulls down the ZIP archive for 0.8.5. How can you set this up so I can choose what version to pull down? The latest is actually 0.9.2, which puts this one a little behind schedule....

Support for application icons?

I'm wondering if there is a way to specify an icon for apps that are launched through nodewebkit. Looking through the code, this doesn't seem to be possible right now, and if not I'm hoping it can be added.

According to https://github.com/rogerwang/node-webkit/wiki/Icons#application-icon, the icons for node-webkit apps are in platform-specific locations and formats. So it seems unlikely that there would be a clean solution.

Maybe bin/nodewebkit could take command-line options with the paths to resource files for each platform? (eg. --linux-desktop-file=/path/to/.desktop, --mac-icon=/path/to/icns). Then nodewebkit could copy them into their required spot in the application bundle. I don't know how this could work for windows though, since AFAIK the icon is embedded in the .exe binary.

What do you think, is adding this feature feasible?

How shall I refresh the app in development?

Hi, Shama,

I am a amateur to node-webkit. It is a great job that you made the installation of node-webkit so easy.

But I am not sure how could I refresh my application when I set window toolbar to false, in that way the refresh button on the toolbar is also gone with the window toolbar..

Is there an easy way to do that like cmd - R

Suggest edit on README.md

On the example section, on the 3rd step, you should add quotes around the path/to/nodewebkit.
Like so:

"node_modules/.bin/nodewebkit" file-explorer

This is on Windows, btw.

NPM install on Windows fails with 'scripts' is not recognized as an internal or external command, operable program or batch file

Trying to install node-webkit in a Windows project of mine and ran into this. I am using Windows 7 and npm v1.3.8. When running npm install nodewebkit I got:

npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
npm http GET https://registry.npmjs.org/zip
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/zip
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/graceful-fs

> [email protected] postinstall G:\test\node_modules\nodewebkit
> scripts/install.js

'scripts' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! weird error 1
npm ERR! not ok code 0

Googling around I found some related issues with other projects and it seems the postinstall example in the npm-scripts documentation isn't so Windows-friendy. Here is an actual GitHub issue with a committed fix.

bminer/node-blade#43
bminer/node-blade@2f4ce9f

You prepend "scripts/install.js" with "node" in the package.json. That worked for me when I tested a local clone of this project:

{
  "name": "nodewebkit",
  "version": "0.7.5-2",
  "description": "A installer for node-webkit",
  "bin": {
    "nodewebkit": "bin/nodewebkit"
  },
  "scripts": {
    "postinstall": "node scripts/install.js"
  },
  "author": "Kyle Robinson Young",
  "license": "MIT",
  "dependencies": {
    "rimraf": "~2.2.2",
    "zip": "~1.1.1",
    "mkdirp": "~0.3.5"
  },
  "keywords": [
    "node-webkit",
    "webkit",
    "installer",
    "desktop",
    "application"
  ]
}

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.