sg-wireless / pymakr-atom

Adds a REPL console to Atom that connects to your Pycom board. It can run code on the board or synchronize your project files.
Other
35 stars 11 forks source link

fix: only serialport 10.0.1 works with Atom #299

Closed jakobrosenberg closed 2 years ago

jakobrosenberg commented 2 years ago

I have tracked the issue down to the serialport version. Only the first beta of v10 (10.0.1) actually works.

We can also revert to 9.x.x, but only v10 has N-API support which works far better in Electron

jakobrosenberg commented 2 years ago

@elmasria can you test this branch locally? I have tested it in WSL, but am gonna test the GUI as well.

elmasria commented 2 years ago

@elmasria can you test this branch locally? I have tested it in WSL, but am gonna test the GUI as well.

Hi @jakobrosenberg,

After trying to do apm install I got the below error


 apm install 
Installing modules ✗
> @serialport/bindings-cpp@10.7.0 install /home/ahmad/projects/pycom/pymakr/pymakr-atom/node_modules/@serialport/bindings-cpp
> node-gyp-build

make: Entering directory '/home/ahmad/projects/pycom/pymakr/pymakr-atom/node_modules/@serialport/bindings-cpp/build'
  CXX(target) Release/obj.target/bindings/src/serialport.o
  CXX(target) Release/obj.target/bindings/src/serialport_unix.o
  CXX(target) Release/obj.target/bindings/src/poller.o
make: Leaving directory '/home/ahmad/projects/pycom/pymakr/pymakr-atom/node_modules/@serialport/bindings-cpp/build'

npm WARN deprecated axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated crypto@1.0.1: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated parser-byte-length@1.0.2: renamed to @serialport/parser-byte-length
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated parser-delimiter@1.0.2: reanmed to @serialport/parser-delimiter
npm WARN deprecated parser-cctalk@1.0.2: reanmed to @serialport/parser-cctalk
npm WARN deprecated parser-readline@1.0.2: reanmed to @serialport/parser-readline
npm WARN deprecated parser-regex@1.0.2: reanmed to @serialport/parser-regex
npm WARN deprecated parser-ready@1.0.2: reanmed to @serialport/parser-ready
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated libcipm@4.0.8: This module is no longer used. Please see @npmcli/arborist if you would like to build and reify package trees programmatically.
npm WARN deprecated read-package-tree@5.3.1: The functionality that this package provided is now in @npmcli/arborist
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
../src/poller.cpp: In static member function ‘static Napi::Object Poller::Init(Napi::Env, Napi::Object)’:
../src/poller.cpp:108:7: error: ‘class Napi::Env’ has no member named ‘SetInstanceData’
  108 |   env.SetInstanceData<Napi::FunctionReference>(constructor);
      |       ^~~~~~~~~~~~~~~
../src/poller.cpp:108:46: error: expected primary-expression before ‘>’ token
  108 |   env.SetInstanceData<Napi::FunctionReference>(constructor);
      |                                              ^
../src/poller.cpp: In static member function ‘static Napi::Value Poller::New(const Napi::CallbackInfo&)’:
../src/poller.cpp:127:53: error: ‘class Napi::Env’ has no member named ‘GetInstanceData’
  127 |   Napi::FunctionReference* constructor = info.Env().GetInstanceData<Napi::FunctionReference>();
      |                                                     ^~~~~~~~~~~~~~~
../src/poller.cpp:127:92: error: expected primary-expression before ‘>’ token
  127 |   Napi::FunctionReference* constructor = info.Env().GetInstanceData<Napi::FunctionReference>();
      |                                                                                            ^
../src/poller.cpp:127:94: error: expected primary-expression before ‘)’ token
  127 |   Napi::FunctionReference* constructor = info.Env().GetInstanceData<Napi::FunctionReference>();
      |                                                                                              ^
make: *** [bindings.target.mk:116: Release/obj.target/bindings/src/poller.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/ahmad/projects/pycom/pymakr/pymakr-atom/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 5.16.11-76051611-generic
gyp ERR! command "/usr/share/atom/resources/app/apm/bin/node" "/home/ahmad/projects/pycom/pymakr/pymakr-atom/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ahmad/projects/pycom/pymakr/pymakr-atom/node_modules/@serialport/bindings-cpp
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok 
npm WARN notsup Unsupported engine for @serialport/bindings-cpp@10.7.0: wanted: {"node":">=12.17.0 <13.0 || >=14.0.0"} (current: {"node":"12.14.1","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/bindings-cpp@10.7.0
npm WARN notsup Unsupported engine for @serialport/bindings-interface@1.2.1: wanted: {"node":"^12.22 || ^14.13 || >=16"} (current: {"node":"12.14.1","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: @serialport/bindings-interface@1.2.1
npm WARN notsup Unsupported engine for @semantic-release/apm-config@9.0.1: wanted: {"node":">=14.17"} (current: {"node":"12.14.1","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: @semantic-release/apm-config@9.0.1
npm WARN notsup Unsupported engine for semantic-release@18.0.1: wanted: {"node":">=14.17"} (current: {"node":"12.14.1","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: semantic-release@18.0.1
npm WARN notsup Unsupported engine for @semantic-release/apm@4.0.2: wanted: {"node":">=14.17"} (current: {"node":"12.14.1","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: @semantic-release/apm@4.0.2
npm WARN notsup Unsupported engine for @semantic-release/changelog@6.0.1: wanted: {"node":">=14.17"} (current: {"node":"12.14.1","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: @semantic-release/changelog@6.0.1
npm WARN notsup Unsupported engine for @semantic-release/commit-analyzer@9.0.2: wanted: {"node":">=14.17"} (current: {"node":"12.14.1","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: @semantic-release/commit-analyzer@9.0.2
npm WARN notsup Unsupported engine for @semantic-release/github@8.0.4: wanted: {"node":">=14.17"} (current: {"node":"12.14.1","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: @semantic-release/github@8.0.4
npm WARN notsup Unsupported engine for @semantic-release/git@10.0.1: wanted: {"node":">=14.17"} (current: {"node":"12.14.1","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: @semantic-release/git@10.0.1
npm WARN notsup Unsupported engine for @semantic-release/release-notes-generator@10.0.3: wanted: {"node":">=14.17"} (current: {"node":"12.14.1","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: @semantic-release/release-notes-generator@10.0.3
npm WARN notsup Unsupported engine for @semantic-release/error@3.0.0: wanted: {"node":">=14.17"} (current: {"node":"12.14.1","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: @semantic-release/error@3.0.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/onchange/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN notsup Unsupported engine for @semantic-release/npm@8.0.3: wanted: {"node":">=14.17"} (current: {"node":"12.14.1","npm":"6.14.13"})
npm WARN notsup Not compatible with your version of node/npm: @semantic-release/npm@8.0.3
npm WARN eslint-config-airbnb@18.2.1 requires a peer of eslint-plugin-jsx-a11y@^6.4.1 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-airbnb@18.2.1 requires a peer of eslint-plugin-react@^7.21.5 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-airbnb@18.2.1 requires a peer of eslint-plugin-react-hooks@^4 || ^3 || ^2.3.0 || ^1.7.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @serialport/bindings-cpp@10.7.0 install: `node-gyp-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @serialport/bindings-cpp@10.7.0 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/ahmad/.atom/.apm/_logs/2022-04-04T06_52_20_040Z-debug.log