添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
  • https://labs.arduino.cc/en/labs/micropython
  • https://github.com/arduino/lab-micropython-editor
  • "Arduino Lab for MicroPython is a lightweight editor for MicroPython programs, supporting connection with a board, code upload, file transfer, interactive REPL shell"
    I came across this in my web wanderings, it's pre-release and a work in progress, but I thought I'd give it a whirl. There are only pre-built X64 versions but the install and build instructions on the GitHub page seemed simple enough -

    Code: Select all

    git clone https://github.com/arduino/lab-micropython-editor.git
    cd lab-micropython-editor
    npm install
    npm run dev
    Unfortunately it seems I have stepped into another 'Build from Source' Circle of Hell.
    Things fell to pieces for me at step 3, 'npm install'. I am using a Pi 3B (non-plus) Raspberry Pi OS 32-bit. -

    Code: Select all

    pi@Pi3B:~/pico $ git clone https://github.com/arduino/lab-micropython-editor.git
    Cloning into 'lab-micropython-editor'...
    remote: Enumerating objects: 1064, done.
    remote: Counting objects: 100% (234/234), done.
    remote: Compressing objects: 100% (99/99), done.
    remote: Total 1064 (delta 126), reused 217 (delta 120), pack-reused 830
    Receiving objects: 100% (1064/1064), 2.95 MiB | 5.51 MiB/s, done.
    Resolving deltas: 100% (542/542), done.
    pi@Pi3B:~/pico $ cd lab-micropython-editor
    

    Code: Select all

    pi@Pi3B:~/pico/lab-micropython-editor $ npm install
    > @serialport/[email protected] install /home/pi/pico/lab-micropython-editor/node_modules/@serialport/bindings-cpp
    > node-gyp-build
    > [email protected] install /home/pi/pico/lab-micropython-editor/node_modules/lzma-native
    > node-gyp-build
    gyp ERR! UNCAUGHT EXCEPTION
    gyp ERR! stack TypeError: Object.fromEntries is not a function
    gyp ERR! stack     at Object.<anonymous> (/home/pi/pico/lab-micropython-editor/node_modules/@npmcli/fs/lib/fs.js:6:23)
    gyp ERR! stack     at Module._compile (internal/modules/cjs/loader.js:778:30)
    gyp ERR! stack     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    gyp ERR! stack     at Module.load (internal/modules/cjs/loader.js:653:32)
    gyp ERR! stack     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    gyp ERR! stack     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    gyp ERR! stack     at Module.require (internal/modules/cjs/loader.js:692:17)
    gyp ERR! stack     at require (internal/modules/cjs/helpers.js:25:18)
    gyp ERR! stack     at Object.<anonymous> (/home/pi/pico/lab-micropython-editor/node_modules/@npmcli/fs/lib/index.js:2:6)
    gyp ERR! stack     at Module._compile (internal/modules/cjs/loader.js:778:30)
    gyp ERR! System Linux 5.10.103-v7+
    gyp ERR! command "/usr/bin/node" "/home/pi/pico/lab-micropython-editor/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /home/pi/pico/lab-micropython-editor/node_modules/lzma-native
    gyp ERR! node -v v10.24.0
    gyp ERR! node-gyp -v v9.1.0
    gyp ERR! Node-gyp failed to build your package.
    gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
    npm WARN [email protected] No repository field.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/dmg-license):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
    npm ERR! code ELIFECYCLE
    npm ERR! errno 7
    npm ERR! [email protected] install: `node-gyp-build`
    npm ERR! Exit status 7
    npm ERR!
    npm ERR! Failed at the [email protected] install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/pi/.npm/_logs/2022-11-27T20_05_58_144Z-debug.log
    pi@Pi3B:~/pico/lab-micropython-editor $
    Some useful info below perhaps. Nothing useful in the '.log' file I could see other than I have shown, everything in the opening snip seems to have worked, and all error reports in the end snip appear to be as above -
    

    Code: Select all

    pi@Pi3B:~/pico $ uname -a
    Linux Pi3B 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux
    pi@Pi3B:~/pico $ npm --version
    6.10.1
    pi@Pi3B:~/pico $ cat /home/pi/.npm/_logs/2022-11-27T20_05_58_144Z-debug.log
    9542 silly install [email protected]
    9543 info lifecycle [email protected]~install: [email protected]
    9544 silly install [email protected]
    9545 info lifecycle [email protected]~install: [email protected]
    9546 verbose lifecycle [email protected]~install: unsafe-perm in lifecycle true
    9547 verbose lifecycle [email protected]~install: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/pico/lab-micropython-editor/node_modules/lzma-native/node_modules/.bin:/home/pi/pico/lab-micropython-editor/node_modules/.bin:/home/pi/.local/bin:/home/pi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
    9548 verbose lifecycle [email protected]~install: CWD: /home/pi/pico/lab-micropython-editor/node_modules/lzma-native
    9549 silly lifecycle [email protected]~install: Args: [ '-c', 'node-gyp-build' ]
    9550 silly lifecycle [email protected]~install: Returned: code: 7  signal: null
    9551 info lifecycle [email protected]~install: Failed to exec install script
    9552 timing action:install Completed in 58593ms
    9553 verbose unlock done using /home/pi/.npm/_locks/staging-b2043543cafa3edf.lock for /home/pi/pico/lab-micropython-editor/node_modules/.staging
    9554 timing stage:rollbackFailedOptional Completed in 481ms
    9555 timing stage:runTopLevelLifecycles Completed in 190524ms
    9556 silly saveTree [email protected]
    9556 silly saveTree ├── [email protected]
    9557 warn [email protected] No repository field.
    9558 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/dmg-license):
    9559 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
    9560 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
    9560 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
    9560 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
    9560 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: arm
    9561 verbose stack Error: [email protected] install: `node-gyp-build`
    9561 verbose stack Exit status 7
    9561 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
    Anyone got any ideas, have managed to build it themselves, knows what needs fixing to get it to work, how to "Try to update npm and/or node-gyp" ?