I am running the following command in Node.js command window in Win10. It failed. anyone has ideas how to fix it? I am running Node.js v7.3.0
C:\Users\haozhang>npm install openssl
C:\Users\haozhang
`-- [email protected]
+-- [email protected]
`-- [email protected]
+-- [email protected]
| `-- [email protected]
`-- [email protected]
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\haozhang\package.json'
npm WARN haozhang No description
npm WARN haozhang No repository field.
npm WARN haozhang No README data
npm WARN haozhang No license field.
C:\Users\haozhang>openssl
'openssl' is not recognized as an internal or external command,
operable program or batch file.
This cause of this error is that one of the dependencies you define in your package. json file fails to be installed properly on your computer. This means that npm fails to install the node-sass module that's added as a dependency to the n-app project.
As mentionned by Royi Mindel the npm openssl package is just a wrapper around the openssl binaries and not the actual openssl. You need to install openssl on your Windows 10 machine as follows:
C:\OpenSSL-Win32\
(or whatever name you want to give it).OPENSSL_CONF
with value c:\OpenSSL-Win32\openssl.cnf
(points to the config file where you extrated the binaries)C:\OpenSSL-Win32\bin
to your Path
environment variableopenssl version
. It should work and you should see the version installedInfo taken from: https://www.tbs-certificates.co.uk/FAQ/en/openssl-windows.html
By looking at the commands you are running, it seems like you are trying to use the installed npm module as an external command. You can achieve this only by installing the module globally:
npm install -g openssl
The warnings you get are expected. Each time you install a module locally, npm will try to update your package.json
with the dependency to the module. Since you probably don't have a package.json in your home directory, you get the warning.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With