在 Ubuntu 18.04 中使用 apostrophe create-project 创建的项目中,npm install 失败
In a project created using apostrophe create-project in Ubuntu 18.04, npm install fails
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! fetch failed https://registry.npmjs.org/less/-/less-3.8.1.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 400
npm ERR! fetch failed https://registry.npmjs.org/nodemailer/-/nodemailer-4.6.8.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 400
npm ERR! fetch failed https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 400
npm ERR! Linux 4.15.0-32-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! Unexpected token < in JSON at position 0
npm ERR! <html>
npm ERR! <head><title>400 The SSL certificate error</title></head>
npm ERR! <body bgcolor="white">
npm ERR! <center><h1>400 Bad Request</h1></center>
npm ERR! <center>The SSL certificate error</center>
npm ERR! <hr><center>cloudflare-nginx</center>
npm ERR! </body>
npm ERR! </html>
npm ERR!
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! /home/radhika/code/practice/test-project/npm-debug.log
我正在关注 apostrophe documentation
我安装了 apostrophe-cli, node, npm, mongo, nginx
我该如何解决这个问题?
如果 npm 在安装某个特定包时出现问题,我该如何解决?
运行
sudo apt-get update && sudo apt-get -y 升级
sudo apt-get install software-properties-common imagemagick build-essential git openssl
为我解决了问题
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! fetch failed https://registry.npmjs.org/less/-/less-3.8.1.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 400
npm ERR! fetch failed https://registry.npmjs.org/nodemailer/-/nodemailer-4.6.8.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 400
npm ERR! fetch failed https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 400
npm ERR! Linux 4.15.0-32-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! Unexpected token < in JSON at position 0
npm ERR! <html>
npm ERR! <head><title>400 The SSL certificate error</title></head>
npm ERR! <body bgcolor="white">
npm ERR! <center><h1>400 Bad Request</h1></center>
npm ERR! <center>The SSL certificate error</center>
npm ERR! <hr><center>cloudflare-nginx</center>
npm ERR! </body>
npm ERR! </html>
npm ERR!
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! /home/radhika/code/practice/test-project/npm-debug.log
我正在关注 apostrophe documentation 我安装了 apostrophe-cli, node, npm, mongo, nginx 我该如何解决这个问题? 如果 npm 在安装某个特定包时出现问题,我该如何解决?
运行 sudo apt-get update && sudo apt-get -y 升级 sudo apt-get install software-properties-common imagemagick build-essential git openssl 为我解决了问题