I am trying to install Angular CLI , ran as admin, and got the following errors
npm ERR! code 2
npm ERR! path C:\Windows\system32\node_modules\#angular\cli
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node
./bin/postinstall/script.js
npm ERR! OpenSSL configuration error:
npm ERR! 74160000:error:80000002:system library:BIO_new_file:No such
file or
directory:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:67:calling
fopen(C:\Program
Files\PostgreSQL\psqlODBC\etc\openssl.cnf, rb)
npm ERR! 74160000:error:10000080:BIO routines:BIO_new_file:no such
file:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:75:
npm ERR! 74160000:error:07000072:configuration file routines:def_load:no
such
file:c:\ws\deps\openssl\openssl\crypto\conf\conf_def.c:179:
I was facing the same issue. Actually I have added OPENSSL for postgre sql thats why It was causing this error. By the way I was installing ionic CLI.
So, go to environment variables, System variables and search for OPENSS_CONF and delete it. For me I deleted this and it worked.
Related
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! request to https://registry.npmjs.org/body-parser failed, reason: unable to get local issuer certificate
Have you tried this terminal command?
npm install npm#latest -g
os: window 10
when I create meteor project, it shows following error. So I can not learn Meteor.
C:\test>meteor create asd
C:\Users\msm08\AppData\Local\.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:218
throw error;
^
Error: Error: Could not install npm dependencies for test-packages: Command failed: C:\WINDOWS\system32\cmd.exe /c C:\Users\msm08\AppData\Local\.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\dev_bundle\bin\npm.cmd install --production=false
npm ERR! code ENOGIT
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\msm08\AppData\Roaming\npm-cache\_logs\2018-04-01T17_24_26_459Z-debug.log
npm ERR! code ENOGIT
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\msm08\AppData\Roaming\npm-cache\_logs\2018-04-01T17_24_26_459Z-debug.log
at Object.error (C:\tools\utils\buildmessage.js:430:11)
at C:\tools\cli\default-npm-deps.js:36:20
at C:\tools\utils\buildmessage.js:334:18
at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:333:36
at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
at Object.enterJob (C:\tools\utils\buildmessage.js:324:26)
at Object.install (C:\tools\cli\default-npm-deps.js:27:27)
at Command.func (C:\tools\cli\commands.js:801:36)
at C:\tools\cli\main.js:1523:15
Check the $path if it contains a Git:
go to this pc -> advanced System Setting -> Environmental Variables
check the Path if it contains GIT.
you can also check it via command prompt and type "Path"
You simply have to install the GIT for windows version from this LINK
It will automatically set the environment variable for GIT on your windows 10 machine. You do not have to do anything else.
I had ionic installed and running properly.
Accidentally I installed beta version
npm install ionic#beta
I did that without having CMD run with administrator, after that ionic command wasn't being recognized anymore, so I tried installing ionic again, but no luck, I tried uninstalling it and then installing it again but also no luck, the error I get when I install it:
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\{user}\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic"
npm ERR! node v6.9.4
npm ERR! npm v4.1.1
npm ERR! path C:\Users\{user}\AppData\Roaming\npm\node_modules\.staging\ansi-313f575d
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\{user}\AppData\Roaming\npm\node_modules\.staging\ansi-313f575d' -> 'C:\Users\{user}\AppData\Roaming\npm\node_modules\ionic\node_modules\cordova-lib\node_modules\ansi'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\{user}\AppData\Roaming\npm\node_modules\.staging\ansi-313f575d' -> 'C:\Users\{user}\AppData\Roaming\npm\node_modules\ionic\node_modules\cordova-lib\node_modules\ansi'
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.
The issue was because when installed beta version without administrator privilege it created PATH variable in user scope which points only to npm directory, and this variable overrides the system PATH variable so CMD uses the user scope one, which causes ionic installation to fail.
Deleting the user's scope PATH variable and re-installing ionic fixed the issue.
I am following the ionic installation guide, but when I want to create app it give me error.
The command I enter is:
ionic start cutePuppyPics --v2
The error it gives is:
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\Nodist\\v\\nodev7.0.0\\node.exe" "C:\\Program Files (x86)\\Nodist\\bin\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v7.0.0
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! node-sass#3.9.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#3.9.3 postinstall script 'node scripts/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\nodeProjects\ionic\cutePuppyPics\npm-debug.log
Error with start undefined
Error Initializing app: There was an error with the spawned command: npminstall
There was an error with the spawned command: npminstall
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
Node v7.0.0 causes this problem. Instead of nodejs v7.0.0 use nodejs v6.9.1 or install LTS version of node from https://nodejs.org/en/download
You don't have to use --v2 when creating your project. Just type
ionic start cutePuppyPics blank
--v2 is not working with latest ionic. you can use
ionic start cutePuppyPics ionic-angular (for ionic 2.x)
ionic start cutePuppyPics ionic1 (ionic 1.x)
I'm trying to install packages using NPM. For example I'm trying to get install mongodb on ubuntu 14.04 by the usual
Sudo npm install mongodb
I get this error
npm ERR! tar.unpack untar error /home/cougs/.npm/mongodb/2.0.45/package.tgz
npm ERR! Linux 3.13.0-61-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "mongodb"
npm ERR! node v4.1.2
npm ERR! npm v2.14.4
npm ERR! path /mnt/nfs_data/byucougars.com/RebelFleet/app/node_modules/mongodb/package.json
npm ERR! code EINVAL
npm ERR! errno -22
npm ERR! syscall chown
npm ERR! EINVAL: invalid argument, chown '/mnt/nfs_data/byucougars.com/RebelFleet/app/node_modules/mongodb/package.json'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /mnt/nfs_data/byucougars.com/RebelFleet/app/npm-debug.log
I'm pretty sure it's a permission issue with my user. probably when I copied stuff to the server via FTP, it screwed things up stuff. I just have no idea how to fix this.
One way to fix this would be to override chown() by LD_PRELOAD to interpose a function which always returns zero ("success"). So instead of
#npm install
you would do
#echo "int chown() { return 0; }" > preload.c && gcc -shared -o preload.so preload.c
#LD_PRELOAD=$PWD/preload.so npm install
I figured out that my code was running on a MNT nfs server using version 4.0. Which changes all permissions to nobody and it was causing the issue to repeat every time I try to fix it. So I just migrated the code back to the original server and it worked fine after that.