Error while installing Cordova












0














I am getting this error while installing Cordova:




npm http GET https://registry.npmjs.org/cordova
npm http GET https://registry.npmjs.org/cordova
npm http GET https://registry.npmjs.org/cordova
npm ERR! Error: CERT_UNTRUSTED*
npm ERR! at SecurePair. (tls.js:1370:32)
npm ERR! at SecurePair.EventEmitter.emit (events.js:92:17)
npm ERR! at SecurePair.maybeInitFinished (tls.js:982:10)
npm ERR! at CleartextStream.read [as _read] (tls.js:469:13)
npm ERR! at CleartextStream.Readable.read (_stream_readable.js:320:10)
npm ERR! at EncryptedStream.write [as _write] (tls.js:366:25)
npm ERR! at doWrite (_stream_writable.js:223:10)
npm ERR! at writeOrBuffer (_stream_writable.js:213:5)
npm ERR! at EncryptedStream.Writable.write
(_stream_writable.js:180:11)
npm ERR! at write (_stream_readable.js:583:24)


Please tell the cause of this error and how I can remove it.










share|improve this question




















  • 1




    I already installed git and npm. Still causing error (CERT_UNTRUSTED).
    – Bhaskar arya
    May 28 '18 at 7:31
















0














I am getting this error while installing Cordova:




npm http GET https://registry.npmjs.org/cordova
npm http GET https://registry.npmjs.org/cordova
npm http GET https://registry.npmjs.org/cordova
npm ERR! Error: CERT_UNTRUSTED*
npm ERR! at SecurePair. (tls.js:1370:32)
npm ERR! at SecurePair.EventEmitter.emit (events.js:92:17)
npm ERR! at SecurePair.maybeInitFinished (tls.js:982:10)
npm ERR! at CleartextStream.read [as _read] (tls.js:469:13)
npm ERR! at CleartextStream.Readable.read (_stream_readable.js:320:10)
npm ERR! at EncryptedStream.write [as _write] (tls.js:366:25)
npm ERR! at doWrite (_stream_writable.js:223:10)
npm ERR! at writeOrBuffer (_stream_writable.js:213:5)
npm ERR! at EncryptedStream.Writable.write
(_stream_writable.js:180:11)
npm ERR! at write (_stream_readable.js:583:24)


Please tell the cause of this error and how I can remove it.










share|improve this question




















  • 1




    I already installed git and npm. Still causing error (CERT_UNTRUSTED).
    – Bhaskar arya
    May 28 '18 at 7:31














0












0








0







I am getting this error while installing Cordova:




npm http GET https://registry.npmjs.org/cordova
npm http GET https://registry.npmjs.org/cordova
npm http GET https://registry.npmjs.org/cordova
npm ERR! Error: CERT_UNTRUSTED*
npm ERR! at SecurePair. (tls.js:1370:32)
npm ERR! at SecurePair.EventEmitter.emit (events.js:92:17)
npm ERR! at SecurePair.maybeInitFinished (tls.js:982:10)
npm ERR! at CleartextStream.read [as _read] (tls.js:469:13)
npm ERR! at CleartextStream.Readable.read (_stream_readable.js:320:10)
npm ERR! at EncryptedStream.write [as _write] (tls.js:366:25)
npm ERR! at doWrite (_stream_writable.js:223:10)
npm ERR! at writeOrBuffer (_stream_writable.js:213:5)
npm ERR! at EncryptedStream.Writable.write
(_stream_writable.js:180:11)
npm ERR! at write (_stream_readable.js:583:24)


Please tell the cause of this error and how I can remove it.










share|improve this question















I am getting this error while installing Cordova:




npm http GET https://registry.npmjs.org/cordova
npm http GET https://registry.npmjs.org/cordova
npm http GET https://registry.npmjs.org/cordova
npm ERR! Error: CERT_UNTRUSTED*
npm ERR! at SecurePair. (tls.js:1370:32)
npm ERR! at SecurePair.EventEmitter.emit (events.js:92:17)
npm ERR! at SecurePair.maybeInitFinished (tls.js:982:10)
npm ERR! at CleartextStream.read [as _read] (tls.js:469:13)
npm ERR! at CleartextStream.Readable.read (_stream_readable.js:320:10)
npm ERR! at EncryptedStream.write [as _write] (tls.js:366:25)
npm ERR! at doWrite (_stream_writable.js:223:10)
npm ERR! at writeOrBuffer (_stream_writable.js:213:5)
npm ERR! at EncryptedStream.Writable.write
(_stream_writable.js:180:11)
npm ERR! at write (_stream_readable.js:583:24)


Please tell the cause of this error and how I can remove it.







networking software-installation npm ubuntu-for-android






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 27 '18 at 7:57









karel

57.5k12127146




57.5k12127146










asked May 27 '18 at 2:05









Bhaskar arya

13




13








  • 1




    I already installed git and npm. Still causing error (CERT_UNTRUSTED).
    – Bhaskar arya
    May 28 '18 at 7:31














  • 1




    I already installed git and npm. Still causing error (CERT_UNTRUSTED).
    – Bhaskar arya
    May 28 '18 at 7:31








1




1




I already installed git and npm. Still causing error (CERT_UNTRUSTED).
– Bhaskar arya
May 28 '18 at 7:31




I already installed git and npm. Still causing error (CERT_UNTRUSTED).
– Bhaskar arya
May 28 '18 at 7:31










1 Answer
1






active

oldest

votes


















0














Your version of npm is not up to date, so you cannot install Cordova until you successfully update it. After your npm is updated to npm 6.1.0 Cordova can be installed successfully. The best way to update npm is to install the node snap package which has npm bundled with it, and then update npm with sudo npm i npm.





Node.js is available as a snap package in all currently supported versions of Ubuntu. Specific to Node.js, developers can choose from one of the currently supported releases and get regular automatic updates directly from NodeSource. Node.js versions 6, 8, 9, 10, 11 and 12 are currently available, with the Snap Store being updated within hours, or minutes of a Node.js release.



Node can be installed with a single command, for example:



sudo snap install node --classic --channel 11/stable 


The node snap can be accessed by the command node, for example:



$ node -v  
v11.5.0


An up-to-date version of npm will installed as part of the node snap. npm should be run outside of the node repl, in your normal shell. After installing the node snap run the following command to enable npm update checking:



sudo chown -R $USER:$(id -gn $USER) /home/your-username/.config


Replace your-username in the above command with your own username. Then run npm -v to check if the version of npm is up-to-date. As an example I checked that npm was up-to-date, checked the version of an already installed package named yarn with the command npm list yarn and then updated the existing yarn package to the latest version with the command npm update yarn



Users can switch between versions of Node.js at any time without needing to involve additional tools like nvm (Node Version Manager), for example:



sudo snap refresh node --channel=10/stable


Users can test bleeding-edge versions of Node.js that can be installed from the latest edge channel which is currently tracking Node.js version 12 by switching with:



sudo snap switch node --edge


This approach is only recommended for those users who are willing to participate in testing and bug reporting upstream.



Node.js LTS Schedule



Release LTS Status  Codename    LTS Start       Maintenance Start Maintenance End
6.x Active Boron 2016-10-18 April 2018 April 2019
7.x No LTS
8.x Active Carbon 2017-10-31 April 2019 December 2019
9.x No LTS
10.x Active Dubnium October 2018 April 2020 April 2021
11.x No LTS 2019-04-01 2019-06-30
12.x No LTS 2019-10-22 2021-04-01 2022-04-01





share|improve this answer























  • i type npm list yarn and get /home/bhaskar/Downloads └── (empty) . after that i type npm update yarn and npm -v . and show the same version .
    – Bhaskar arya
    May 30 '18 at 12:10












  • @Bhaskararya That's OK and also expected. yarn has nothing to do with Cordova. I just used the yarn package as an example of how npm works.
    – karel
    May 30 '18 at 12:13










  • so how to update my npm . i want to install cordova very badly. thanks for help me .
    – Bhaskar arya
    May 30 '18 at 12:15










  • Run sudo npm i npm to update npm to the latest version.
    – karel
    May 30 '18 at 12:17










  • it not working either giving same error. no matter whether i try to update with npm i npm or npm install --save latest-version. i uninstall all the packages(git,nodjs,npm) and reinstall that not work either.
    – Bhaskar arya
    May 30 '18 at 12:23











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1040752%2ferror-while-installing-cordova%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Your version of npm is not up to date, so you cannot install Cordova until you successfully update it. After your npm is updated to npm 6.1.0 Cordova can be installed successfully. The best way to update npm is to install the node snap package which has npm bundled with it, and then update npm with sudo npm i npm.





Node.js is available as a snap package in all currently supported versions of Ubuntu. Specific to Node.js, developers can choose from one of the currently supported releases and get regular automatic updates directly from NodeSource. Node.js versions 6, 8, 9, 10, 11 and 12 are currently available, with the Snap Store being updated within hours, or minutes of a Node.js release.



Node can be installed with a single command, for example:



sudo snap install node --classic --channel 11/stable 


The node snap can be accessed by the command node, for example:



$ node -v  
v11.5.0


An up-to-date version of npm will installed as part of the node snap. npm should be run outside of the node repl, in your normal shell. After installing the node snap run the following command to enable npm update checking:



sudo chown -R $USER:$(id -gn $USER) /home/your-username/.config


Replace your-username in the above command with your own username. Then run npm -v to check if the version of npm is up-to-date. As an example I checked that npm was up-to-date, checked the version of an already installed package named yarn with the command npm list yarn and then updated the existing yarn package to the latest version with the command npm update yarn



Users can switch between versions of Node.js at any time without needing to involve additional tools like nvm (Node Version Manager), for example:



sudo snap refresh node --channel=10/stable


Users can test bleeding-edge versions of Node.js that can be installed from the latest edge channel which is currently tracking Node.js version 12 by switching with:



sudo snap switch node --edge


This approach is only recommended for those users who are willing to participate in testing and bug reporting upstream.



Node.js LTS Schedule



Release LTS Status  Codename    LTS Start       Maintenance Start Maintenance End
6.x Active Boron 2016-10-18 April 2018 April 2019
7.x No LTS
8.x Active Carbon 2017-10-31 April 2019 December 2019
9.x No LTS
10.x Active Dubnium October 2018 April 2020 April 2021
11.x No LTS 2019-04-01 2019-06-30
12.x No LTS 2019-10-22 2021-04-01 2022-04-01





share|improve this answer























  • i type npm list yarn and get /home/bhaskar/Downloads └── (empty) . after that i type npm update yarn and npm -v . and show the same version .
    – Bhaskar arya
    May 30 '18 at 12:10












  • @Bhaskararya That's OK and also expected. yarn has nothing to do with Cordova. I just used the yarn package as an example of how npm works.
    – karel
    May 30 '18 at 12:13










  • so how to update my npm . i want to install cordova very badly. thanks for help me .
    – Bhaskar arya
    May 30 '18 at 12:15










  • Run sudo npm i npm to update npm to the latest version.
    – karel
    May 30 '18 at 12:17










  • it not working either giving same error. no matter whether i try to update with npm i npm or npm install --save latest-version. i uninstall all the packages(git,nodjs,npm) and reinstall that not work either.
    – Bhaskar arya
    May 30 '18 at 12:23
















0














Your version of npm is not up to date, so you cannot install Cordova until you successfully update it. After your npm is updated to npm 6.1.0 Cordova can be installed successfully. The best way to update npm is to install the node snap package which has npm bundled with it, and then update npm with sudo npm i npm.





Node.js is available as a snap package in all currently supported versions of Ubuntu. Specific to Node.js, developers can choose from one of the currently supported releases and get regular automatic updates directly from NodeSource. Node.js versions 6, 8, 9, 10, 11 and 12 are currently available, with the Snap Store being updated within hours, or minutes of a Node.js release.



Node can be installed with a single command, for example:



sudo snap install node --classic --channel 11/stable 


The node snap can be accessed by the command node, for example:



$ node -v  
v11.5.0


An up-to-date version of npm will installed as part of the node snap. npm should be run outside of the node repl, in your normal shell. After installing the node snap run the following command to enable npm update checking:



sudo chown -R $USER:$(id -gn $USER) /home/your-username/.config


Replace your-username in the above command with your own username. Then run npm -v to check if the version of npm is up-to-date. As an example I checked that npm was up-to-date, checked the version of an already installed package named yarn with the command npm list yarn and then updated the existing yarn package to the latest version with the command npm update yarn



Users can switch between versions of Node.js at any time without needing to involve additional tools like nvm (Node Version Manager), for example:



sudo snap refresh node --channel=10/stable


Users can test bleeding-edge versions of Node.js that can be installed from the latest edge channel which is currently tracking Node.js version 12 by switching with:



sudo snap switch node --edge


This approach is only recommended for those users who are willing to participate in testing and bug reporting upstream.



Node.js LTS Schedule



Release LTS Status  Codename    LTS Start       Maintenance Start Maintenance End
6.x Active Boron 2016-10-18 April 2018 April 2019
7.x No LTS
8.x Active Carbon 2017-10-31 April 2019 December 2019
9.x No LTS
10.x Active Dubnium October 2018 April 2020 April 2021
11.x No LTS 2019-04-01 2019-06-30
12.x No LTS 2019-10-22 2021-04-01 2022-04-01





share|improve this answer























  • i type npm list yarn and get /home/bhaskar/Downloads └── (empty) . after that i type npm update yarn and npm -v . and show the same version .
    – Bhaskar arya
    May 30 '18 at 12:10












  • @Bhaskararya That's OK and also expected. yarn has nothing to do with Cordova. I just used the yarn package as an example of how npm works.
    – karel
    May 30 '18 at 12:13










  • so how to update my npm . i want to install cordova very badly. thanks for help me .
    – Bhaskar arya
    May 30 '18 at 12:15










  • Run sudo npm i npm to update npm to the latest version.
    – karel
    May 30 '18 at 12:17










  • it not working either giving same error. no matter whether i try to update with npm i npm or npm install --save latest-version. i uninstall all the packages(git,nodjs,npm) and reinstall that not work either.
    – Bhaskar arya
    May 30 '18 at 12:23














0












0








0






Your version of npm is not up to date, so you cannot install Cordova until you successfully update it. After your npm is updated to npm 6.1.0 Cordova can be installed successfully. The best way to update npm is to install the node snap package which has npm bundled with it, and then update npm with sudo npm i npm.





Node.js is available as a snap package in all currently supported versions of Ubuntu. Specific to Node.js, developers can choose from one of the currently supported releases and get regular automatic updates directly from NodeSource. Node.js versions 6, 8, 9, 10, 11 and 12 are currently available, with the Snap Store being updated within hours, or minutes of a Node.js release.



Node can be installed with a single command, for example:



sudo snap install node --classic --channel 11/stable 


The node snap can be accessed by the command node, for example:



$ node -v  
v11.5.0


An up-to-date version of npm will installed as part of the node snap. npm should be run outside of the node repl, in your normal shell. After installing the node snap run the following command to enable npm update checking:



sudo chown -R $USER:$(id -gn $USER) /home/your-username/.config


Replace your-username in the above command with your own username. Then run npm -v to check if the version of npm is up-to-date. As an example I checked that npm was up-to-date, checked the version of an already installed package named yarn with the command npm list yarn and then updated the existing yarn package to the latest version with the command npm update yarn



Users can switch between versions of Node.js at any time without needing to involve additional tools like nvm (Node Version Manager), for example:



sudo snap refresh node --channel=10/stable


Users can test bleeding-edge versions of Node.js that can be installed from the latest edge channel which is currently tracking Node.js version 12 by switching with:



sudo snap switch node --edge


This approach is only recommended for those users who are willing to participate in testing and bug reporting upstream.



Node.js LTS Schedule



Release LTS Status  Codename    LTS Start       Maintenance Start Maintenance End
6.x Active Boron 2016-10-18 April 2018 April 2019
7.x No LTS
8.x Active Carbon 2017-10-31 April 2019 December 2019
9.x No LTS
10.x Active Dubnium October 2018 April 2020 April 2021
11.x No LTS 2019-04-01 2019-06-30
12.x No LTS 2019-10-22 2021-04-01 2022-04-01





share|improve this answer














Your version of npm is not up to date, so you cannot install Cordova until you successfully update it. After your npm is updated to npm 6.1.0 Cordova can be installed successfully. The best way to update npm is to install the node snap package which has npm bundled with it, and then update npm with sudo npm i npm.





Node.js is available as a snap package in all currently supported versions of Ubuntu. Specific to Node.js, developers can choose from one of the currently supported releases and get regular automatic updates directly from NodeSource. Node.js versions 6, 8, 9, 10, 11 and 12 are currently available, with the Snap Store being updated within hours, or minutes of a Node.js release.



Node can be installed with a single command, for example:



sudo snap install node --classic --channel 11/stable 


The node snap can be accessed by the command node, for example:



$ node -v  
v11.5.0


An up-to-date version of npm will installed as part of the node snap. npm should be run outside of the node repl, in your normal shell. After installing the node snap run the following command to enable npm update checking:



sudo chown -R $USER:$(id -gn $USER) /home/your-username/.config


Replace your-username in the above command with your own username. Then run npm -v to check if the version of npm is up-to-date. As an example I checked that npm was up-to-date, checked the version of an already installed package named yarn with the command npm list yarn and then updated the existing yarn package to the latest version with the command npm update yarn



Users can switch between versions of Node.js at any time without needing to involve additional tools like nvm (Node Version Manager), for example:



sudo snap refresh node --channel=10/stable


Users can test bleeding-edge versions of Node.js that can be installed from the latest edge channel which is currently tracking Node.js version 12 by switching with:



sudo snap switch node --edge


This approach is only recommended for those users who are willing to participate in testing and bug reporting upstream.



Node.js LTS Schedule



Release LTS Status  Codename    LTS Start       Maintenance Start Maintenance End
6.x Active Boron 2016-10-18 April 2018 April 2019
7.x No LTS
8.x Active Carbon 2017-10-31 April 2019 December 2019
9.x No LTS
10.x Active Dubnium October 2018 April 2020 April 2021
11.x No LTS 2019-04-01 2019-06-30
12.x No LTS 2019-10-22 2021-04-01 2022-04-01






share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 31 '18 at 11:12

























answered May 28 '18 at 8:06









karel

57.5k12127146




57.5k12127146












  • i type npm list yarn and get /home/bhaskar/Downloads └── (empty) . after that i type npm update yarn and npm -v . and show the same version .
    – Bhaskar arya
    May 30 '18 at 12:10












  • @Bhaskararya That's OK and also expected. yarn has nothing to do with Cordova. I just used the yarn package as an example of how npm works.
    – karel
    May 30 '18 at 12:13










  • so how to update my npm . i want to install cordova very badly. thanks for help me .
    – Bhaskar arya
    May 30 '18 at 12:15










  • Run sudo npm i npm to update npm to the latest version.
    – karel
    May 30 '18 at 12:17










  • it not working either giving same error. no matter whether i try to update with npm i npm or npm install --save latest-version. i uninstall all the packages(git,nodjs,npm) and reinstall that not work either.
    – Bhaskar arya
    May 30 '18 at 12:23


















  • i type npm list yarn and get /home/bhaskar/Downloads └── (empty) . after that i type npm update yarn and npm -v . and show the same version .
    – Bhaskar arya
    May 30 '18 at 12:10












  • @Bhaskararya That's OK and also expected. yarn has nothing to do with Cordova. I just used the yarn package as an example of how npm works.
    – karel
    May 30 '18 at 12:13










  • so how to update my npm . i want to install cordova very badly. thanks for help me .
    – Bhaskar arya
    May 30 '18 at 12:15










  • Run sudo npm i npm to update npm to the latest version.
    – karel
    May 30 '18 at 12:17










  • it not working either giving same error. no matter whether i try to update with npm i npm or npm install --save latest-version. i uninstall all the packages(git,nodjs,npm) and reinstall that not work either.
    – Bhaskar arya
    May 30 '18 at 12:23
















i type npm list yarn and get /home/bhaskar/Downloads └── (empty) . after that i type npm update yarn and npm -v . and show the same version .
– Bhaskar arya
May 30 '18 at 12:10






i type npm list yarn and get /home/bhaskar/Downloads └── (empty) . after that i type npm update yarn and npm -v . and show the same version .
– Bhaskar arya
May 30 '18 at 12:10














@Bhaskararya That's OK and also expected. yarn has nothing to do with Cordova. I just used the yarn package as an example of how npm works.
– karel
May 30 '18 at 12:13




@Bhaskararya That's OK and also expected. yarn has nothing to do with Cordova. I just used the yarn package as an example of how npm works.
– karel
May 30 '18 at 12:13












so how to update my npm . i want to install cordova very badly. thanks for help me .
– Bhaskar arya
May 30 '18 at 12:15




so how to update my npm . i want to install cordova very badly. thanks for help me .
– Bhaskar arya
May 30 '18 at 12:15












Run sudo npm i npm to update npm to the latest version.
– karel
May 30 '18 at 12:17




Run sudo npm i npm to update npm to the latest version.
– karel
May 30 '18 at 12:17












it not working either giving same error. no matter whether i try to update with npm i npm or npm install --save latest-version. i uninstall all the packages(git,nodjs,npm) and reinstall that not work either.
– Bhaskar arya
May 30 '18 at 12:23




it not working either giving same error. no matter whether i try to update with npm i npm or npm install --save latest-version. i uninstall all the packages(git,nodjs,npm) and reinstall that not work either.
– Bhaskar arya
May 30 '18 at 12:23


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1040752%2ferror-while-installing-cordova%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Human spaceflight

Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

張江高科駅