Unable to install p5.serialserver on a mac - server

I have been trying to install p5.serial server on a mac for 2 days to no avail.
I have tried everything I can think of to try and download p5.serialserver on a mac. I used all three methods suggested in the documentation (https://github.com/p5-serial/p5.serialport) which were
clone the repository and run
npm install
This failed when I ran npm install and I was not able to proceed to the next step. Then I tried
sudo npm install -g p5.serialserver
and
npm install p5.serialserver
It keeps giving me errors that 3 arguments are required, but 2 were provided like below:
npm ERR! /path/path/path/node-gyp/17.4.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
Then the following:
npm ERR! ^
npm ERR! 4 errors generated.
npm ERR! make: *** [Release/obj.target/bindings/src/serialport.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/path/path/path/.nvm/versions/node/v17.4.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.1.0
npm ERR! gyp ERR! command "/path/path/path/.nvm/versions/node/v17.4.0/bin/node" "/path/path/path/.nvm/versions/node/v17.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /path/path/path/.nvm/versions/node/v17.4.0/lib/node_modules/p5.serialserver/node_modules/#serialport/bindings
npm ERR! gyp ERR! node -v v17.4.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
I assume this is because there are updated required and some of the packages required have changed, but I'm not sure which packages or how to resolve this. I tried downgrading the version of node I was using, but that did not work. If anyone has any more suggestions please inform.
Update: I ran p5.serialserver at https://npm.runkit.com/p5.serialserver.
It gave more errors based on what is in the module. Does that mean that it is not possible to use? Errors linked here: https://runkit.com/embed/9rlymlps3vcx

I have finally figured this out after a professor sent resources to explain the error. Basically, you need to download to nodev12.20.2 in order to use p5 serial (probably because of outdated dependencies)
I did this by running the following in the terminal. You can use nvm to run different versions of node, so I suggest using it to install node if you didn't already:
nvm install 12.20.2
nvm use 12.20.2
node -v
Confirm that the terminal is running node v12.20.2
sudo npm install serialport --unsafe-perm -g
sudo npm install ws -g
sudo npm install p5.serialserver --unsafe-perm -g
Then just run the following to start the server:
p5serial
And it should start the server. Hope this helps someone else because this was driving me crazy.

Related

Npm install produces error Could not find any Visual Studio installation to use, code --version produces vs code version, added it to path

Trying to run ionic, capacitor, react project after long time again on windows machine, before everything worked good, now first it asked me for python, so i installed it and added it to path, then it asks me for VS Code, I'm working in VS Code, added it as well to path, but still getting error "Could not find any Visual Studio installation to use", even though i run npm install comand from VS Code and also entering code --version gets me vs code version
PS C:\Dev\pianoNew\PianoTrainerNewPlayer\osmd-player-react-master> code --version
1.70.1
6d9b74a70ca9c7733b29f0456fd8195364076dda
x64
This is complete error messsage
PS C:\Dev\pianoNew\PianoTrainerNewPlayer\piano> npm install
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated #fortawesome/fontawesome#1.1.8: This package is deprecated. See https://git.io/fNCzJ for information about upgrading.
npm WARN deprecated formidable#1.2.6: Please upgrade to latest, formidable#v2 or formidable#v3! Check these notes: LINK REMOVED
npm WARN deprecated xmldom#0.1.19: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated superagent#4.1.0: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>.
npm WARN deprecated ionic#5.4.16: The Ionic CLI now uses ✨ #ionic/cli ✨ for its package name! 👉 https://twitter.com/ionicframework/status/1223268498362851330
npm WARN deprecated #fortawesome/fontawesome-free-brands#5.0.13: This package is deprecated. See https://git.io/fNCzJ for information about upgrading.
npm WARN deprecated #fortawesome/fontawesome-free-solid#5.0.13: This package is deprecated. See https://git.io/fNCzJ for information about upgrading.
npm ERR! code 1
npm ERR! path C:\Dev\pianoNew\PianoTrainerNewPlayer\piano\node_modules\cap
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.1
npm ERR! gyp info using node#16.14.2 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.6 found at "C:\Python106\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:406:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:526:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Dev\pianoNew\PianoTrainerNewPlayer\piano\node_modules\cap
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\eloi0\AppData\Local\npm-cache\_logs\2022-08-15T03_33_16_265Z-debug-0.log
PS C:\Dev\pianoNew\PianoTrainerNewPlayer\piano> code .
PS C:\Dev\pianoNew\PianoTrainerNewPlayer\piano> code --version
1.70.1
6d9b74a70ca9c7733b29f0456fd8195364076dda
x64
PS C:\Dev\pianoNew\PianoTrainerNewPlayer\piano>

Running subprocess npm get me a error when creating ionic project

I just get this error when I try to lunch a new project on ionic 2.
I got a mkdir error, even by running the command on sudo, I use mac os.
I tried reinstall node, cordovan npm, tried to make some update, and googled the problem but can't find a solution.
Please help me, I'm an ionic beginner.
The error:
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/Loic/appIonic/swipeCard/test/node_modules/node-sass/build'
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/Users/Loic/appIonic/swipeCard/test/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/Loic/appIonic/swipeCard/test/node_modules/node-sass
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.9.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.9.0 postinstall 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/Loic/.npm/_logs/2018-09-22T16_45_54_600Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm i exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Thank
Try clearing the npm cache at C:\Users\\AppData\Roaming\npm-cache\
I was not using ionic for like six months. When i came back they asked me to update ionic to the latest version. After the update i can't even start a new project. So after wasting sometime i just downgraded to ionic 3.20.0 using the command
npm install -g cordova ionic#3.20.0
and now it's working fine

Trying to deploy IBM Watson NLC in Bluemix and get Error: EACCES, mkdir '/opt/IBM/node/share/man/man3' error (every time)

I have created the IBM Watson Natural Language Processor service and I'm trying to deploy the training application. It creates the project, clones the repository, and configures the pipeline, but gets an error during the 'Deploy to Bluemix' step.
The error is:
Cloning the 'master' branch from repo 'https://P90MSG01:3041/git/esilky/ibmwatson-nlc-groundtruth-esilky-952'
/opt/IBM/node/bin/npm -> /opt/IBM/node/lib/node_modules/npm/bin/npm-cli.js
npm ERR! Error: EACCES, mkdir '/opt/IBM/node/share/man/man3'
npm ERR! { [Error: EACCES, mkdir '/opt/IBM/node/share/man/man3']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/opt/IBM/node/share/man/man3' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.13.0-52-generic
npm ERR! command "/opt/IBM/node/bin/node" "/opt/IBM/node/bin/npm" "install" "npm#2.14.4" "-g"
npm ERR! cwd /home/pipeline/6abb55b0-7254-4bc1-8d74-aa4550db9b1b
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /opt/IBM/node/share/man/man3
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/opt/IBM/node/share/man/man3'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pipeline/6abb55b0-7254-4bc1-8d74-aa4550db9b1b/npm-debug.log
npm ERR! not ok code 0
Finished: ERRORED
What needs to be done to resolve this?
Looks like your question was already answered here.
According to Patrick Wagstrom, the problem was fixed in December 7, 2015
If you try to deploy the NLC toolkit today it will work.
NLC Toolkit: https://hub.jazz.net/project/wdctools/ibmwatson-nlc-groundtruth/overview

sudo npm install -g ionic error

MacBooks-MacBook-Pro:~ Apple$ sudo npm install -g ionic
Password:
npm ERR! network tunneling socket could not be established, cause=getaddrinfo ENOTFOUND
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! System Darwin 13.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "ionic"
npm ERR! cwd /Users/Apple
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! code ECONNRESET
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/Apple/npm-debug.log
npm ERR! not ok code 0
Try installing without sudo
npm install -g ionic
If that does not help there is an existing Github issue about proxies:
https://github.com/npm/npm/issues/3354
You might also try this Stack Overflow question:
Is there a way to make npm install (the command) to work behind proxy?

Npm install directly from Github Error: ENOENT

I'm running an example from build-nodejs-npm-installation-package-scratch. Instead of uploading to npm repository I'm putting it on Github and trying to download it via npm instead. I run npm install git+https://github.com/t2wu/replaceme.git and got the following:
npm ERR! Error: ENOENT, chmod '/private/tmp/node_modules/replaceme_tim/replaceme.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "git+https://github.com/t2wu/replaceme.git"
npm ERR! cwd /private/tmp
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path /private/tmp/node_modules/replaceme_tim/replaceme.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /private/tmp/npm-debug.log
npm ERR! not ok code 0
I have a package.json in there, I cannot figure out what is wrong.
EDIT: I can install Express OK, but I can't install my practice module
This happens due to missing permissions or unlinked files while npm was working. This topicc is also seen at github, here.
Try running with admin perms.