Issue installing node Argon2 on macbook - argon2-ffi

Attempting to install node argon2 on MacBook 2019.
I would expect it to succeed
Followed instruction on npm - argon2
CXX=g++-6 npm install argon2
Error messages:
make: g++-6: No such file or directory

Related

AWS CodeBuild: ERROR: Could not build wheels for cmake, ninja

Running command pip install --no-binary ':all:' ddtrace cause i need to install arm64 version (cause default pkg uses binary code). On local system i got it installed correctly, but on AWS i got an error:
Failed to build cmake ninja
ERROR: Could not build wheels for cmake, ninja which use PEP 517 and cannot be installed directly
Python version - 3.9.6
PIP version - 21.1.3

Can't Install xmlsec for Mac

I'm new to django. i am tring to implement python3-saml which requires Xmlsec. i am trying to install it Using "pip install xmlsec" on my virtal environment. but throwing this error.
Collecting xmlsec
Using cached xmlsec-1.3.12.tar.gz (64 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: lxml>=3.8 in
/opt/anaconda3/envs/conda_saml_env/lib/python3.10/site-packages (from xmlsec)
(4.8.0)
Building wheels for collected packages: xmlsec
Building wheel for xmlsec (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for xmlsec (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
running bdist_wheel
running build
running build_py
package init file 'src/xmlsec/__init__.py' not found (or not a regular file)
creating build
creating build/lib.macosx-10.9-x86_64-3.10
creating build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/py.typed -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/tree.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/__init__.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/constants.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/template.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
running build_ext
error: xmlsec1 is not installed or not in path.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with
pip.
ERROR: Failed building wheel for xmlsec
Failed to build xmlsec
ERROR: Could not build wheels for xmlsec, which is required to install
pyproject.toml-based projects
I tried the following
brew install libxml2 libxmlsec1 pkg-config
Output for above command is
Warning: libxml2 2.9.12 is already installed and up-to-date.
To reinstall 2.9.12, run:
brew reinstall libxml2
Warning: libxmlsec1 1.2.33 is already installed and up-to-date.
To reinstall 1.2.33, run:
brew reinstall libxmlsec1
Warning: pkg-config 0.29.2_3 is already installed and up-to-date.
To reinstall 0.29.2_3, run:
brew reinstall pkg-config
I got the same issue when i tried on Linux OS. Then i was able to solve this by running this command
sudo apt-get install libxmlsec1-dev
But i'm not able to run this command on my Mac. Is there anything i'm missing.
Use these Commands :
xcode-select --install
brew upgrade
brew install libxml2 libxmlsec1
pip install xmlsec

AWS-Amplify-cli fails to install on Mac

Trying to install AWS-Amplify-CLI and followed this
When I run npm install -g #aws-amplify/cli or sudo npm install -g #aws-amplify/cli I get the following errors
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for fsevents#1.2.7 and node#11.8.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/node/lib/node_modules/#aws-amplify/cli/node_modules/fsevents/lib'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/node/lib/node_modules/#aws-amplify/cli/node_modules/fsevents/build'
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/lib/node_modules/node/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/node/lib/node_modules/#aws-amplify/cli/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" "--module_name=fse" "--module_path=/usr/local/lib/node_modules/node/lib/node_modules/#aws-amplify/cli/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64" "--napi_version=4" "--node_abi_napi=napi"
gyp ERR! cwd /usr/local/lib/node_modules/node/lib/node_modules/#aws-amplify/cli/node_modules/fsevents
gyp ERR! node -v v11.8.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/lib/node_modules/node/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/node/lib/node_modules/#aws-amplify/cli/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/usr/local/lib/node_modules/node/lib/node_modules/#aws-amplify/cli/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/node/lib/node_modules/#aws-amplify/cli/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:197:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/usr/local/lib/node_modules/node/bin/node" "/usr/local/lib/node_modules/node/lib/node_modules/#aws-amplify/cli/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/node/lib/node_modules/#aws-amplify/cli/node_modules/fsevents
node-pre-gyp ERR! node -v v11.8.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/lib/node_modules/node/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/node/lib/node_modules/#aws-amplify/cli/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/usr/local/lib/node_modules/node/lib/node_modules/#aws-amplify/cli/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
npm WARN graphql-import#0.4.5 requires a peer of graphql#^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules/#aws-amplify/cli/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 install: node install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
#aws-amplify/cli#0.1.44
added 2 packages from 1 contributor, removed 6 packages and updated 29 packages in 57.461s
When I install node-pre-gyp and node-gyp separately, I get the same errors.
I have CHMOD 0777 on the project folder and then tried to install again without the -g flag, but same error.
OS: Mojave 10.14.2
Node: v11.8.0
npm: 6.5.0
You may also try the following command that worked for me :
sudo npm install -g #aws-amplify/cli --unsafe-perm=true
Fixed.
It seems that there was an issue with my global installation of node and npm, missing/incorrect entries in:
~/.bash_profile
~/.bashrc
The fix was to totally remove node & npm, the re-install using nvm. I followed these:
https://github.com/brock/node-reinstall/
https://gist.github.com/d2s/372b5943bce17b964a79
Please note:
you may need to remove some node or npm files manually
you may need to upgrade node and/or npm afterwards
you may need to reinstall individual node packages afterwards.
I had a similar issue. I needed to set the python version for some odd reason. Something like
npm config set python python2.7 && npm install
Amplify needs local resources and needs to be tied to a environment especially if you are switching between them.
Like dev/prod or local dev on a Mac vs some dev in windows.
Look at amplify env add
I had node installed via brew so my fix was:
uninstall node completely
brew uninstall --force node
install node via: https://nodejs.org/es/ which updates PATH automatically
install amplify:
sudo npm install -g #aws-amplify/cli --unsafe-perm=true
This is what I did to solve this:
Re-install node to the latest version. You can do that using the following steps:
- sudo npm cache clean -f (force) clear you npm cache
- sudo npm install -g n install n (this might take a while)
- sudo n stable upgrade to the current stable version
Note that sudo might prompt your password.
Install amplify:
sudo npm install -g #aws-amplify/cli --unsafe-perm=true
This last process may take a while.
EACCES permissions errors when installing packages globally
First uninstall amplify
npm uninstall -g #aws-amplify/cli
or
sudo amplify uninstall
Reinstall npm with a node version manager, I recommend this guide https://tecadmin.net/install-nvm-macos-with-homebrew/
On command line create a directory for global installations
mkdir ~/.npm-global
Configure npm to use the new directory path:
npm config set prefix '~/.npm-global'
For versions after MacOS Catalina uses nano ~/.zshrc and for versions before this version uses nano ~/.profile and add the next line
export PATH=~/.npm-global/bin:$PATH
On the command line, update your system variables. If you used ~/. zshrc
source ~/.zshrc
If you used ~/. profile
source ~/.profile
Then try to install amplify
npm install -g #aws-amplify/cli
While the accepted solution seemed to work initially, I encountered further EACCES: permission error while using amplify-cli. The way I got it solved is by resolving EACESS permissions as recommended by npmjs documentation.
Instructions:
On the command line, in your home directory, create a directory for global installations:
mkdir ~/.npm-global
Configure npm to use the new directory path:
npm config set prefix '~/.npm-global'
In your preferred text editor, open or create a ~/.profile file and add this line:
nano ~/.profile
export PATH=~/.npm-global/bin:$PATH
On the command line, update your system variables:
source ~/.profile
Test if the added path is working by looking for the string .npm-global/bin in the outpout:
echo $PATH
Finally, install aws-amplify/cli without using sudo as follows:
npm install -g #aws-amplify/cli

Unable to add fcm plugin in ionic 2 app

I am trying to add fcm plugin in my project but it shows following error
ionic cordova plugin add cordova-plugin-fcm
> cordova plugin add cordova-plugin-fcm --save
Error: Failed to fetch plugin file:node_modules/cordova-plugin-fcm via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963238 Error output:
npm ERR! addLocal Could not install F:\PROJECTS\IONIC2\foodJunctionMobileApp\node_modules\cordova-plugin-fcm
npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "file:node_modules/cordova-plugin-fcm" "--production" "--save"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! path F:\PROJECTS\IONIC2\foodJunctionMobileApp\node_modules\cordova-plugin-fcm
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'F:\PROJECTS\IONIC2\foodJunctionMobileApp\node_modules\cordova-plugin-fcm'
npm ERR! enoent ENOENT: no such file or directory, open 'F:\PROJECTS\IONIC2\foodJunctionMobileApp\node_modules\cordova-plugin-fcm'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! F:\PROJECTS\IONIC2\foodJunctionMobileApp\npm-debug.log
here is my
ionic info
cli packages: (C:\Users\Rohit\AppData\Roaming\npm\node_modules)
#ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 3.1.6
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 25.2.5
Node : v6.9.5
npm : 3.10.10
OS : Windows 10
Environment Variables:
ANDROID_HOME : C:\Users\Rohit\AppData\Local\Android\sdk
Misc:
backend : pro
I am connected to the internet so that is not the problem. I have added google plus plugin before installing fcm and that time it was conflicting with fcm plugin so I removed google plus plugin and tried to install fcm only but failed.kindly help if anyone knows about it. Thank you.
I use this firebase plugin:
https://www.npmjs.com/package/cordova-plugin-firebase
This is how you can install it :
cordova plugin add cordova-plugin-firebase#0.1.24 --save
It also works with the lates ionic version.
you can follow this tutorial, it explains all the errors that you can get during the process, hope this helps.
https://www.djamware.com/post/58a1378480aca7386754130a/ionic-2-fcm-push-notification

ionic 2 update problems

I'm trying to update my current ionic version 2.0.0-beta.32 to the latest version.
1) I runned the command : sudo npm install -g ionic
2) I runned the command : npm outdated
Package Current Wanted Latest Location
#angular/common 2.0.0-rc.4 2.0.0-rc.4 2.4.8 #angular/common
#angular/compiler 2.0.0-rc.4 2.0.0-rc.4 2.4.8 #angular/compiler
#angular/core 2.0.0-rc.4 2.0.0-rc.4 2.4.8 #angular/core
#angular/forms 0.2.0 0.2.0 2.4.8 #angular/forms
#angular/http 2.0.0-rc.4 2.0.0-rc.4 2.4.8 #angular/http
#angular/platform-browser 2.0.0-rc.4 2.0.0-rc.4 2.4.8 #angular/platform-browser
#angular/platform-browser-dynamic 2.0.0-rc.4 2.0.0-rc.4 2.4.8 #angular/platform-browser-dynamic
angular2-jwt 0.1.17 0.1.17 0.1.28 angular2-jwt
del 2.2.0 2.2.0 2.2.2 del
es6-shim 0.35.0 0.35.0 0.35.3 es6-shim
gulp-watch 4.3.5 4.3.5 4.3.11 gulp-watch
ionic-angular 2.0.0-beta.10 2.0.0-beta.10 2.0.1 ionic-angular
ionic-native 1.3.2 1.3.2 2.5.1 ionic-native
reflect-metadata 0.1.3 0.1.3 0.1.10 reflect-metadata
run-sequence 1.1.5 1.1.5 1.2.2 run-sequence
rxjs 5.0.0-beta.6 5.0.0-beta.6 5.2.0 rxjs
zone.js 0.6.26 0.6.26 0.7.7 zone.js
3) then I runned the command : sudo npm install ionic-angular#latest. Here I got this error :
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "ionic-angular#latest"
npm ERR! node v4.2.0
npm ERR! npm v2.14.7
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package #angular/common#2.0.0-rc.4 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer #angular/forms#0.2.0 wants #angular/common#^2.0.0-rc.4
npm ERR! peerinvalid Peer #angular/platform-browser#2.0.0-rc.4 wants #angular/common#^2.0.0-rc.4
npm ERR! peerinvalid Peer #angular/platform-browser-dynamic#2.0.0-rc.4 wants #angular/common#^2.0.0-rc.4
npm ERR! peerinvalid Peer ionic-angular#2.0.1 wants #angular/common#2.2.1
npm ERR! peerinvalid Peer #angular/platform-server#2.2.1 wants #angular/common#2.2.1
npm ERR! Please include the following file with any support request:
npm ERR! /Users/macbookpro/Desktop/ThePennyInc/penny-mobile-app/npm-debug.log
Any help please !
There have been a lot of breaking changes from beta to the latest ionic version including file structure and app scripts.
Check here fro steps to upgrade from Beta version. Though it says to RC0, you could follow the steps to upgrade your project by starting a new project and copying the files.
There may be errors in the code due to breaking changes in different versions.
To verify,
Here is the latest package.json for the current ionic version.