Open ilium007 opened 2 years ago
I can install serialport/bindings-cpp from the command prompt:
❯ npm i @serialport/bindings-cpp@10.7.0
up to date, audited 83 packages in 1s
22 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
❯ npm ls
xxxx@ /Users/xxxx
└── @serialport/bindings-cpp@10.7.0
After some trial and error, this should finally be fixed in 2.3.7
.
@jakobrosenberg - whilst it now installs the USB serial devices are not present in the drop down list although I have two connected devices:
~/.atom/packages/pymakr 11:14:05
❯ apm install 100% LIBERTY2 104 Mbps
Installing modules ✗
> fsevents@1.2.13 install /Users/brantwinter/.atom/packages/pymakr/node_modules/fsevents
> node install.js
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
SOLINK_MODULE(target) Release/fse.node
> @serialport/bindings-cpp@10.7.0 install /Users/brantwinter/.atom/packages/pymakr/node_modules/@serialport/bindings-cpp
> node-gyp-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
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
../src/poller.cpp:108:7: error: no member named 'SetInstanceData' in 'Napi::Env'
env.SetInstanceData<Napi::FunctionReference>(constructor);
~~~ ^
../src/poller.cpp:108:46: error: expected '(' for function-style cast or type construction
env.SetInstanceData<Napi::FunctionReference>(constructor);
~~~~~~~~~~~~~~~~~~~~~~~^
../src/poller.cpp:127:53: error: no member named 'GetInstanceData' in 'Napi::Env'
Napi::FunctionReference* constructor = info.Env().GetInstanceData<Napi::FunctionReference>();
~~~~~~~~~~ ^
../src/poller.cpp:127:92: error: expected '(' for function-style cast or type construction
Napi::FunctionReference* constructor = info.Env().GetInstanceData<Napi::FunctionReference>();
~~~~~~~~~~~~~~~~~~~~~~~^
../src/poller.cpp:127:94: error: expected expression
Napi::FunctionReference* constructor = info.Env().GetInstanceData<Napi::FunctionReference>();
^
5 errors generated.
make: *** [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 (/Users/brantwinter/.atom/packages/pymakr/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 Darwin 21.4.0
gyp ERR! command "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Users/brantwinter/.atom/packages/pymakr/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/brantwinter/.atom/packages/pymakr/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 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! /Users/brantwinter/.atom/.apm/_logs/2022-04-07T01_14_42_430Z-debug.log
~/.atom/packages/pymakr 29s 11:14:42
❯
Debug log:
Then tried to remove and reinstall:
My NPM is installed via homebrew ie. in /usr/local/bin/npm
❯ which npm
/usr/local/bin/npm
Thanks @ilium007, I'll have a look into this.
As a temporary solution, you can cd into pymakr and run npm install serialport
manually. It should be installed in ~/.atom/packages/pymakr
if I remember correctly.
I tried that, made no difference. The red error above only occurs when I tried the 'manual' installation steps. When installing from in-app it does not occur.
Can you check which version of node
you have installed? (node -v
)
❯ node -v
v17.8.0
Hi,
Pymkr 2.3.7 + Atom 1.60.0 doesn't work on macOS 12.3.1. Manual install of serialport in ~/.atom/packages/pymkr doesn't work (using Atom provided node/npm). Log:
191 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"})
192 warn notsup Not compatible with your version of node/npm: @serialport/bindings-cpp@10.7.0
193 verbose notsup Not compatible with your version of node/npm: @serialport/bindings-cpp@10.7.0
193 verbose notsup Required: {"node":">=12.17.0 <13.0 || >=14.0.0"}
193 verbose notsup Actual: {"npm":"6.14.13","node":"12.14.1"}
194 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"})
195 warn notsup Not compatible with your version of node/npm: @serialport/bindings-interface@1.2.1
196 verbose notsup Not compatible with your version of node/npm: @serialport/bindings-interface@1.2.1
196 verbose notsup Required: {"node":"^12.22 || ^14.13 || >=16"}
196 verbose notsup Actual: {"npm":"6.14.13","node":"12.14.1"}
Won't install in Atom (current download, OSX)