CLI Compile Fails

I have this exact same problem. Pretty annoying, as it seems to compound my issues with getting OTA updates to Electrons.

Anyway, I’ve solved it for myself in the short term by having particle-cli @ 0.14.2 globally and then installing a local copy of particle-cli @ 0.12.0 inside the directory of my application. I can then call the 0.12.0 version with

./builds/node_modules/particle-cli/bin/particle.js compile electron

And then flash OTA with 0.14.2.

I don’t think this version of CLI is anywhere near up-to-date.
currently we are at 1.15.0

Sorry, not sure why I put 0.12.0 and 0.14.2, I meant 1.12.0 and 1.14.2.

Can you give 1.15.0 a try. There should be a fix for multi-level hierachies included.
At least for me it seems to work on Win 10

Yes, I just upgraded and 1.15.0 does not work for me. I’m on Mac 10.11.5.

My directory structure is as follows:

  • Main app.h and app.cpp
  • Library folders, linked to the project with the particle.include file via specific file locations, e.g. ‘libraries/temp/temp.cpp’

1.15.0 seems to try to upload all files in all sub directories of the location where I compile, ignoring the particle.include file.

Ideally for me, it would only pick up the files specified in my include file.

@ScruffR – thinking about this more, why does the newest particle-cli consume all files in the location you run it plus all directories below that place? This doesn’t seem like an optimal way for particle build servers to consume just what they need.

Maybe I am doing something wrong with how I structure my code, but it seems like I will always have random files, at least in my subdirectories. For example, I am not sure how you could use a library that is in a folder without first deleting all of its examples.

Yup, that's what you'd need to do. But when I want to import libraries I only want the actual lib files anyway.
And this is also how others prefered it.
But since this is not optimal Particle is coming up with Libraries 2.0 which will do away with a lot of that clumsiness.

1 Like