首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装辛托邦国家预防机制后不起作用

安装辛托邦国家预防机制后不起作用
EN

Stack Overflow用户
提问于 2016-08-17 17:42:16
回答 2查看 1K关注 0票数 3

在安装辛托邦之前,一切都很好,但在那之后,npm失败了。请帮我滚回原来的设置。

当它试图安装新的npm软件包时,它就会出错。例如。当我做这个的时候

代码语言:javascript
复制
npm install -g mocha grunt-cli bower karma-cli

npm ERR! Linux 4.4.0-34-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "mocha" "grunt-cli" "bower" "karma-cli"
npm ERR! node v4.4.5
npm ERR! npm  v2.15.5
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! syscall connect

npm ERR! Error: connect ECONNREFUSED 127.0.0.1:4873
npm ERR!     at Object.exports._errnoException (util.js:870:11)
npm ERR!     at exports._exceptionWithHostPort (util.js:893:20)
npm ERR!     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14)
npm ERR!  { [Error: connect ECONNREFUSED 127.0.0.1:4873]
npm ERR!   code: 'ECONNREFUSED',
npm ERR!   errno: 'ECONNREFUSED',
npm ERR!   syscall: 'connect',
npm ERR!   address: '127.0.0.1',
npm ERR!   port: 4873 }
npm ERR! 
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly.  See: 'npm help config'

npm ERR! Please include the following file with any support request:
npm ERR!     /home/owaishanif/huble/meetings/npm-debug.log

这是我的Sin胸配置文件

代码语言:javascript
复制
#
# This is the default config file. It allows all users to do anything,
# so don't use it on production systems.
#
# Look here for more config file examples:
# https://github.com/rlidwka/sinopia/tree/master/conf
#

# path to a directory with all packages
storage: /home/owaishanif/.local/share/sinopia/storage

auth:
  htpasswd:
    file: ./htpasswd
    # Maximum amount of users allowed to register, defaults to "+inf".
    # You can set this to -1 to disable registration.
    #max_users: 1000

# a list of other known repositories we can talk to
uplinks:
  npmjs:
    url: https://registry.npmjs.org/

packages:
  '@*/*':
    # scoped packages
    access: $all
    publish: $authenticated

  '*':
    # allow all users (including non-authenticated users) to read and
    # publish all packages
    #
    # you can specify usernames/groupnames (depending on your auth plugin)
    # and three keywords: "$all", "$anonymous", "$authenticated"
    access: $all

    # allow all known users to publish packages
    # (anyone can register by default, remember?)
    publish: $authenticated

    # if package is not available locally, proxy requests to 'npmjs' registry
    proxy: npmjs

# log settings
logs:
  - {type: stdout, format: pretty, level: http}
  #- {type: file, path: sinopia.log, level: info}
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-08-18 05:45:26

若要引用标准npm注册表而不是您自己的注册表,可以运行

代码语言:javascript
复制
npm set registry https://registry.npmjs.org/

这将更新您的.npmrc配置文件。

票数 9
EN

Stack Overflow用户

发布于 2016-08-17 22:04:23

在玩了很多与弱视,最后,我改变了大量的~/.npmrc文件,并评论了这一行。

代码语言:javascript
复制
registery=http://localhost:4873   

现在,一切都在正常工作,因为软件包的安装是没有问题的。仍然需要解决办法,以完全消除辛托邦效应。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39003119

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档