Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Installing on Windows #136

Closed
excelthoughts opened this issue Apr 20, 2016 · 14 comments
Closed

Installing on Windows #136

excelthoughts opened this issue Apr 20, 2016 · 14 comments

Comments

@excelthoughts
Copy link

Hi

Does anyone know what the the minimum install requirements for Windows are?

I followed instructions on https://evothings.com/doc/build/cordova-install-windows.html
to get the cordova-hot-code-push to run on my dev pc successfully. Note: that Python was not installed in any step.

I don't think that I need to install all of that just to be able to run
cordova-hcp build [www_directory]

Somebody thought that I should only have to to install nodejs, but then the npm installer throws an error saying that Python is not installed.

I have a fresh Windows install, have installed nodejs, Git, Cordova, still complains about Python not installed.

any ideas?

@excelthoughts
Copy link
Author

Since that I have found https://github.com/nodejs/node-gyp

I'm on Windows 7

So -

  1. install nodejs
  2. $ npm install -g node-gyp
  3. Install Python 2.7.10 and add Environment variable
  4. Install Visual Studio 2013

Does this seem like a minimum install?

@nikDemyankov
Copy link
Member

Hi,

Don't have a windows machine, so can't really suggest anything, sorry :(

But feels like the setup you gave in the last post should be enough. Although, don't think that you need Visual Studio.

For cordova-hcp - if you can't make it to install because of the Python - you can skip it. As a workaround for building chcp.manifest file you can take code from https://github.com/nordnet/cordova-hot-code-push-cli/blob/master/src/build.js and execute it. It does exactly that.

@nikDemyankov
Copy link
Member

Also, maybe this will help: https://mlusiak.com/2013/12/22/fixing-failing-npm-packages-on-windows/ . It seems like you just need to install Python 2.7 and add Environment variable.

@swbradshaw
Copy link

I have the same problem. I've installed Python 2.7 and set the Environment variable. I get past the Python issue, and I get past the Visual Studio compiler issue (also a requirement), but now it won't install the leveldown package. A quick search shows that this can't be installed from NPM on Windows.

@nikDemyankov I took your build.js and tried executing that with Node, and I get an error:

        result.sort((a, b) => {
                           ^^
SyntaxError: Unexpected token =>
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

@nikDemyankov
Copy link
Member

@swbradshaw my guess is that you took src/build.js. Try to use dist/build.js. Difference between them is that src/ uses ES6 syntax, while dist/ - is src/ code, translated into ES5.

@nikDemyankov
Copy link
Member

@swbradshaw not sure, that leveldown package is needed for CLI client, will check it out and if possible - remove it from the dependencies and re-publish the package.

@nikDemyankov
Copy link
Member

@swbradshaw Removed that package from dependencies, uploaded v1.1.1 of CLI client on npm. Hope it will work for you.

@swbradshaw
Copy link

swbradshaw commented May 5, 2016

@nikDemyankov I took the src/build.js you linked to in your comment. I tried the dist/build.js and got another error:


module.js:338
    throw err;
          ^
Error: Cannot find module 'prompt'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at C:\Projects\ionic\goodsissue\build.js:5:16
    at Object.<anonymous> (C:\Projects\ionic\goodsissue\build.js:120:3)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)


So I installed prompt, fs-extra, async, q, loadash, recursive-readdir, hidefile, and NOW it runs, but doesn't output anything.

I'm running C:\Project\>node build.js www

@swbradshaw
Copy link

1.1.1 is still trying to install leveldown. :-( I'm going to see if I can find out the cause.

@swbradshaw
Copy link

@nikDemyankov I did a verbose output from the install and saw the following:

npm info preinstall [email protected]
npm WARN peerDependencies The peer dependency level@~1.3.0 included from s3-sync-aws will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.

I was running npm 2.15.1 (stable NodeJS), so it was installing leveldown.

I just upgraded to npm 3.8.6, and now it installs correctly.

@nikDemyankov
Copy link
Member

@swbradshaw So, now CLI client is installed and working properly. Just needed to upgrade Node version?

@swbradshaw
Copy link

swbradshaw commented May 6, 2016

@nikDemyankov Correct. CLI client requres Python and npm 3+ to install on Windows. Thank you for the help!

@nikDemyankov
Copy link
Member

Great, thanks!

@nordnet-deprecation-bot
Copy link
Contributor

👋 Hi! Thank you for your interest in this repo.

😢 We are not using nordnet/cordova-hot-code-push anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork.

🔒 This will now be closed & locked.

ℹ️ Please see #371 for more information.

@nordnet nordnet locked and limited conversation to collaborators Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants