Building with PlatformIO fails with "no package.json manifest" error

jwatte

Well-known member
I'm trying to get any project going in Visual Studio Code, because the Arduino IDE drives me crazy.
Thus, I'm using (trying to use) platformio.
I've previously successfully used platformio for direct AVR chip development (not teensy based.)

I've upgraded to the latest version for platformio core.
I'm running this from the command line, as well as from Visual Studio Code.
I keep getting an error that 'package.json' isn't found in "the package" (it doesn't say which package)

I'm using Windows 10 Pro.

Here's the necessary details:

Code:
(base) PS C:\Users\jwatte\code\malum_teensy36_firmware> pio run -v
Processing teensy (platform: teensy; framework: arduino; board: teensy36; upload_protocol: teensy-cli)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Error: Could not find one of 'package.json' manifest files in the package
(base) PS C:\Users\jwatte\code\malum_teensy36_firmware> type platformio.ini
; https://docs.platformio.org/page/projectconf.html

[platformio]
default_envs = teensy

[env:teensy]
platform = teensy
framework = arduino
board = teensy36
upload_protocol = teensy-cli

If I remove the "framework = arduino" config, I don't get that error, but instead none of the necessary headers are found, so that seems like a necessary requirement.

Searching the web, the closest I could get was "you should maybe remove any globally installed library," which I don't quite understand what it means. Global in what sense? I haven't, as far as I know, installed any platformio package globally. How would I check?
Also, running with "-v" doesn't actually print what it's looking for, so, does anyone know how to make it tell me where it's looking?

FWIW, Teensyduino works fine. "fine" -- the IDE is still not good, and the "external editor" integration still isn't particularly useful. But the teensy bits are solid as normal.

Additional info:

Code:
(base) PS C:\Users\jwatte\code\malum_teensy36_firmware> pio pkg install -p teensy -d .
Resolving teensy dependencies...
Platform Manager: teensy@4.12.0 is already installed
Tool Manager: toolchain-gccarmnoneeabi@1.50401.190816 is already installed
Tool Manager: framework-arduinoteensy@1.153.0 is already installed
Error: Could not find one of 'package.json' manifest files in the package
(base) PS C:\Users\jwatte\code\malum_teensy36_firmware>
 
@jwatte:

I don't use PlatformIO specifically, but is there anything on <this> page that might help with any clues for overcoming your problem ??

Mark J Culross
KD5RXT
 
Thanks, Mark. I had read that page in a fair amount of detail, it didn't actually help me troubleshoot this problem.

This comment seems to help:
https://github.com/platformio/platformio-home/issues/1785#issuecomment-1141292058

Specifically, it talks about the ".platformio" directory in my system home directory, and then I can remove the subdirectories from with in the cache, platform, and lib subdirectories, and try to re-initialize everything.
So, doing that, and waiting for the re-install when doing another fresh build, fixed the problem!
 
Thanks, Mark. I had read that page in a fair amount of detail, it didn't actually help me troubleshoot this problem.

This comment seems to help:
https://github.com/platformio/platformio-home/issues/1785#issuecomment-1141292058

Specifically, it talks about the ".platformio" directory in my system home directory, and then I can remove the subdirectories from with in the cache, platform, and lib subdirectories, and try to re-initialize everything.
So, doing that, and waiting for the re-install when doing another fresh build, fixed the problem!

Glad you got it going !!

Mark J Culross
KD5RXT
 
Last edited:
Back
Top