Toolchain for Windows Installer


#43

I get the same response, it just freezes


#44

Could you try adding a -dd flag to get any debug output?


#45
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\stevew>npm install -g serialport -dd
npm info it worked if it ends with ok
npm verb cli [ 'C:\\Particle\\Tools\\NodeJS\\\\node.exe',
npm verb cli   'C:\\Particle\\Tools\\NodeJS\\node_modules\\npm\\bin\\npm-cli.js'
,
npm verb cli   'install',
npm verb cli   '-g',
npm verb cli   'serialport',
npm verb cli   '-dd' ]
npm info using npm@2.11.3
npm info using node@v0.12.7
npm verb install initial load of \\crystal\FolderRedirections\stevew\Application
 Data\npm\package.json
npm verb readDependencies loading dependencies from \\crystal\FolderRedirections
\stevew\Application Data\npm\package.json
npm verb cache add spec serialport
npm verb addNamed "*" is a valid semver range for serialport
npm verb addNameRange registry:https://registry.npmjs.org/serialport not in flig
ht; fetching
npm verb request uri https://registry.npmjs.org/serialport
npm verb request no auth needed
npm info attempt registry request try #1 at 3:57:27 PM
npm verb request id bac0cb1b687111e2
npm verb etag "5WVB7LVONXX6AM90S1Y8XUZPE"
npm http request GET https://registry.npmjs.org/serialport
npm http 304 https://registry.npmjs.org/serialport
npm verb etag https://registry.npmjs.org/serialport from cache
npm verb get saving serialport to \\crystal\FolderRedirections\stevew\Applicatio
n Data\npm-cache\registry.npmjs.org\serialport\.cache.json
npm verb addNamed "1.7.4" is a plain semver version for serialport
npm verb afterAdd \\crystal\FolderRedirections\stevew\Application Data\npm-cache
\serialport\1.7.4\package\package.json not in flight; writing
npm verb afterAdd \\crystal\FolderRedirections\stevew\Application Data\npm-cache
\serialport\1.7.4\package\package.json written
npm info install serialport@1.7.4 into \\crystal\FolderRedirections\stevew\Appli
cation Data\npm
npm info installOne serialport@1.7.4
npm verb installOne of serialport to \\crystal\FolderRedirections\stevew\Applica
tion Data\npm not in flight; installing
npm verb lock using \\crystal\FolderRedirections\stevew\Application Data\npm-cac
he\_locks\serialport-d76cf28381779e71.lock for \\crystal\FolderRedirections\stev
ew\Application Data\npm\node_modules\serialport
npm verb unbuild node_modules\serialport
npm info preuninstall serialport@1.7.4
npm info uninstall serialport@1.7.4
npm verb unbuild rmStuff serialport@1.7.4 from \\crystal\FolderRedirections\stev
ew\Application Data\npm\node_modules
npm verb gentlyRm vacuuming from \\crystal\FolderRedirections\stevew\Application
 Data\npm\serialportlist.cmd up to \\crystal\FolderRedirections\stevew\Applicati
on Data\npm
npm verb gentlyRm vacuuming from \\crystal\FolderRedirections\stevew\Application
 Data\npm\serialportterm.cmd up to \\crystal\FolderRedirections\stevew\Applicati
on Data\npm
npm verb gentlyRm vacuuming from \\crystal\FolderRedirections\stevew\Application
 Data\npm\serialportlist up to \\crystal\FolderRedirections\stevew\Application D
ata\npm
npm verb gentlyRm vacuuming from \\crystal\FolderRedirections\stevew\Application
 Data\npm\serialportterm up to \\crystal\FolderRedirections\stevew\Application D
ata\npm
npm info postuninstall serialport@1.7.4
npm verb gentlyRm don't care about contents; nuking \\crystal\FolderRedirections
\stevew\Application Data\npm\node_modules\serialport
npm verb tar unpack \\crystal\FolderRedirections\stevew\Application Data\npm-cac
he\serialport\1.7.4\package.tgz
npm verb tar unpacking to \\crystal\FolderRedirections\stevew\Application Data\n
pm\node_modules\serialport
npm verb gentlyRm don't care about contents; nuking \\crystal\FolderRedirections
\stevew\Application Data\npm\node_modules\serialport

#46

I have no idea :weary: Things to try:

  • try deleting everything in %appdata%/npm/nodemodules
  • uninstall and reinstall nodejs
  • reboot windows several times
  • reinstall windows
  • kick your computer
  • throw your computer out the window…

#47

@mumblepins you forgot a statement after “throw your computer out the window AND send me all your photons”


#48

Try following the steps manually here if you want to get it going:


#49

@mumblepins, i think i found a path error that’s causing issues. The auto installed path for MinGW is “C:\Particle\Toolchain\MinGW” but I changed it to “C:\Particle\Toolchain\MinGW\bin” and then I was able to install cd modules.

I was looking over the MinGW website http://www.mingw.org/wiki/getting_started in the Environment Settings section and say they included the \bin


#50

You might need to move your path updates to the start of the path? At least for me, other stuff got picked up and broke this until I moved that stuff’s priority…


#51

Any plans for an Eclipse version? I’m allergic to NetBeans.


#52

Hi everyone, I’ve been on vacation for the last several weeks, and so haven’t touched this in a bit. I’m glad that at least some people are having success with this :wink: I’ll try to update it over the next few days to make it more robust, and userfriendly. @naikrovek, I haven’t really used Eclipse, but if I get a chance I’ll try to look into it :smile:


#53

Don’t worry about it, unless you are looking for a challenge or something.

I got it working a while ago, I can get it again.


#54

Eclipse gives me psychological problems.


#55

I don’t get that… I cut my teeth on Eclipse, so it makes lots of sense to me.

I have very little experience with Netbeans or Idea, and accordingly, I hate them both fiercely. They make no sense to me at all.

Anyway, I’ll cater to my own needs. I realize I’m out of step.


#56

Hi @mumblepins,

I am trying to use the toolchain. My PC has a large PATH, this message shows up running your installer:
PATH not updated, original length 2048 >1024.
Maybe something to look in to?

regards,
Marcus


#57

Hi @mumblepins

I downloaded your installer, thanks very much for it. Here’s some feedback:

  1. When I ran the installer, I had all options check. I was a bit surprised to see that the Python 2.7 installer actually deleted my 2.7 installation elsewhere to put it where I told it under the Particle tree. I use Python for other purposes and this can break that. I just thought it would be a separate copy. (I realize it’s a python installer issue). Perhaps a comment in the installer saying not to select python if you already have it?

  2. Firing up netbeans and hitting build the toolchain was all marked red and I had to enter it manually. I installed to C:\Programs\Particle

  3. Running the dfu update make command failed. I think it’s because of dfu-util failing on the second flash. I’ve seen elsewhere that this error is “normal.” (“Error during download get_status”). Now since the user-part was flashed before the other part, the other part never got executed because of the failure.

  4. The installer hosed my particle-cli and now I cannot set up my Photon. When I invoke “particle setup” I get this output:

    C:\Programs\Particle\firmware\main>particle setup
    Error loading command C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\commands\CloudCommands.js Error: Cannot find module C:\Users\sosman\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\serialport\v1.7.4\Release\node-v14-win32-x64\serialport.node
    Error loading command C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\commands\SerialCommand.js Error: Cannot find module C:\Users\sosman\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\serialport\v1.7.4\Release\node-v14-win32-x64\serialport.node
    `
    _ _ _ _
    _ __ __ _ _ | |() | | ___ () ___
    | ’
    \ / _’ | '
    | | |/ | |/ _ \ | |/ _
    | |) | (| | | | |_| | (
    | | /| | () |
    | .
    / _,|| _|_|_
    ||__(
    )|___/
    |
    | https://particle.io/

    Setup is easy! Let’s get started…
    It appears as though you are already logged in as sauce@xxxx.com
    ? Would you like to log in with a different account? No

    ! PROTIP: Hold the MODE/SETUP button on your device until it blinks blue!
    ! PROTIP: Please make sure you are connected to the internet.

    C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\node_modules\inquirer\node_modules\rx\dist\rx.js:579
    throw e;
    ^
    TypeError: Cannot read property ‘findDevices’ of undefined
    at SetupCommand.findDevice (C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\commands\SetupCommand\index.js:294:8)
    at accountStatus (C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\commands\SetupCommand\index.js:151:19)
    at PromptUI.switchChoice [as completed] (C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\commands\SetupCommand\index.js:118:4)
    at PromptUI.onCompletion (C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\node_modules\inquirer\lib\ui\prompt.js:69:10)
    at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.completed (C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\node_modules
    inquirer\node_modules\rx\dist\rx.js:1793:12)
    at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\nod
    e_modules\inquirer\node_modules\rx\dist\rx.js:1730:14)
    at AnonymousObserver.tryCatcher (C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\node_modules\inquirer\node_modules\rx\dist\rx.js:56
    7:29)
    at AutoDetachObserverPrototype.completed (C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\node_modules\inquirer\node_modules\rx\dist
    \rx.js:5288:56)
    at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\no
    de_modules\inquirer\node_modules\rx\dist\rx.js:1730:14)
    at InnerObserver.onCompleted (C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\node_modules\inquirer\node_modules\rx\dist\rx.js:3425:
    65)


#58

Here’s some more information for the particle-cli error.

C:\Users\sauce\Downloads\particle-cli-master>npm ls
particle-cli@1.6.5 C:\Users\sauce\Downloads\particle-cli-master
├── UNMET DEPENDENCY chalk@^1.0.0
├── UNMET DEPENDENCY cli-spinner@^0.2.1
├── UNMET DEPENDENCY cli-table@^0.3.1
├── UNMET DEPENDENCY glob@^4.2.1
├── UNMET DEPENDENCY hogan.js@^2.0.0
├── UNMET DEPENDENCY inquirer@^0.8.2
├── UNMET DEPENDENCY lodash@^3.10.1
├── UNMET DEPENDENCY moment@^2.9.0
├── UNMET DEPENDENCY node-wifiscanner2@^1.0.0
├── UNMET DEPENDENCY request@^2.46.0
├── UNMET DEPENDENCY serialport@^1.5.0
├── UNMET DEPENDENCY softap-setup@^1.1.4
├── UNMET DEPENDENCY when@^3.7.2
└── UNMET DEPENDENCY xtend@^4.0.0

npm ERR! missing: chalk@^1.0.0, required by particle-cli@1.6.5
npm ERR! missing: cli-spinner@^0.2.1, required by particle-cli@1.6.5
npm ERR! missing: cli-table@^0.3.1, required by particle-cli@1.6.5
npm ERR! missing: glob@^4.2.1, required by particle-cli@1.6.5
npm ERR! missing: hogan.js@^2.0.0, required by particle-cli@1.6.5
npm ERR! missing: inquirer@^0.8.2, required by particle-cli@1.6.5
npm ERR! missing: lodash@^3.10.1, required by particle-cli@1.6.5
npm ERR! missing: moment@^2.9.0, required by particle-cli@1.6.5
npm ERR! missing: node-wifiscanner2@^1.0.0, required by particle-cli@1.6.5
npm ERR! missing: request@^2.46.0, required by particle-cli@1.6.5
npm ERR! missing: serialport@^1.5.0, required by particle-cli@1.6.5
npm ERR! missing: softap-setup@^1.1.4, required by particle-cli@1.6.5
npm ERR! missing: when@^3.7.2, required by particle-cli@1.6.5
npm ERR! missing: xtend@^4.0.0, required by particle-cli@1.6.5

#59

You guys don’t mind me turning this into my personal blog, do you? Anyway, I manually installed each of the missing dependencies, and still had the same output when I tried “particle setup” as mentioned above.

So I removed particle-cli using npm and reinstalled 1.6.9 which I had manually downloaded from git, and particle-cli now appears to be working again. I was able to re-setup my Photon.

C:\Users\sauce\Downloads\particle-cli-master>npm uninstall -g particle-cli
unbuild particle-cli@1.6.5

C:\Users\sauce\Downloads\particle-cli-master>npm install -g particle-cli
npm WARN engine particle-cli@1.6.9: wanted: {"node":"^0.10.0"} (current: {"node":"0.12.7","npm":"2.11.3"})
|
> serialport@1.7.4 install C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport
> node-pre-gyp install --fallback-to-build

[serialport] Success: "C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\serialport\v1.7.4\Release\node-v14-
win32-x64\serialport.node" is installed via remote
C:\Users\sauce\AppData\Roaming\npm\particle -> C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli\bin\particle.js
particle-cli@1.6.9 C:\Users\sauce\AppData\Roaming\npm\node_modules\particle-cli
├── cli-spinner@0.2.1
├── xtend@4.0.0
├── node-wifiscanner2@1.0.0
├── chalk@1.1.1 (escape-string-regexp@1.0.3, supports-color@2.0.0, ansi-styles@2.1.0, has-ansi@2.0.0, strip-ansi@3.0.0)
├── cli-table@0.3.1 (colors@1.0.3)
├── when@3.7.3
├── glob@4.5.3 (inherits@2.0.1, once@1.3.2, inflight@1.0.4, minimatch@2.0.10)
├── hogan.js@2.0.0
├── moment@2.10.6
├── lodash@3.10.1
├── inquirer@0.8.5 (figures@1.3.5, ansi-regex@1.1.1, cli-width@1.0.1, through@2.3.8, readline2@0.1.1, rx@2.5.3)
├── softap-setup@1.1.4 (node-rsa@0.2.25, nconf@0.7.2)
├── request@2.61.0 (aws-sign2@0.5.0, forever-agent@0.6.1, stringstream@0.0.4, tunnel-agent@0.4.1, caseless@0.11.0, oauth-sign@0.8.0, isstream@0.1.2, j
son-stringify-safe@5.0.1, extend@3.0.0, node-uuid@1.4.3, qs@4.0.0, combined-stream@1.0.5, form-data@1.0.0-rc3, mime-types@2.1.5, http-signature@0.11.0
, bl@1.0.0, tough-cookie@2.0.0, har-validator@1.8.0, hawk@3.1.0)
└── serialport@1.7.4 (bindings@1.2.1, sf@0.1.7, async@0.9.0, nan@1.8.4, debug@2.2.0, optimist@0.6.1)

C:\Users\sauce\Downloads\particle-cli-master>particle

Welcome to the Particle Command line utility!
https://github.com/spark/particle-cli

Usage: particle <command_name> <arguments>
Common Commands:

    setup, list, call, get, device, identify, flash, subscribe
    compile, monitor, login, logout, help

Less Common Commands:
    token, cloud, config, function, keys, serial, udp, update
    variable, webhook, wireless

For more information Run: particle help <command_name>


C:\Users\sauce\Downloads\particle-cli-master>particle setup
                  _   _      _        _
 _ __   __ _ _ __| |_(_) ___| | ___  (_) ___
| '_ \ / _` | '__| __| |/ __| |/ _ \ | |/ _ \
| |_) | (_| | |  | |_| | (__| |  __/_| | (_) |
| .__/ \__,_|_|   \__|_|\___|_|\___(_)_|\___/
|_|                     https://particle.io/

> Setup is easy! Let's get started...
> It appears as though you are already logged in as sauce@xxx.com
? Would you like to log in with a different account? (y/N)

The reset of the setup proceeded as normal.

So something about the particle-cli installed by the installer was jacked up.

Sauce


#60

I uninstalled and reinstalled the particle CLI and it fixed my issue, which looks the same as yours.


#61

Your installer saved me a bunch of time - THANKS!

Quick question: In your v0.4.3a update notes you mention “Added Update capability” What is this?


#62

@mumblepins, Thank you so much for taking the time to make that installer, and sharing it with the rest of us!
It is friggen awesome!

I made a video to do the same long ago, but this is far, far better.

After being away from Spark/Particle for a long time now I am getting back into with with my Photon. I looked into this and everything I have tried has not worked until I bumped into your post here.

I do have one question that for one reason or another I have not quite figured out yet, and that is how to set up netbeans for compiling my app. I am not sure if I should tell it to use the makefile in the Main folder or the user folder.
Might you have any explanation how to go through this process to create a new project ?