Giter VIP home page Giter VIP logo

smart-npm's Introduction

Zhonglei Qiu's Dev Card

smart-npm's People

Contributors

bitdeli-chef avatar greenkeeper[bot] avatar greenkeeperio-bot avatar qiu8310 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smart-npm's Issues

centos6.5安装失败

[root@iZ23oir9az1Z ]# npm install --global smart-npm --registry=https://registry.npm.taobao.org/
npm WARN lifecycle [email protected]
preinstall: cannot run in wd %s %s (wd=%s) [email protected] npm config set registry https://registry.npm.taobao.org/ /root/.nvm/versions/node/v6.0.0/lib/node_modules/.staging/smart-npm-ef71f992
/root/.nvm/versions/node/v6.0.0/bin/smart-npm -> /root/.nvm/versions/node/v6.0.0/lib/node_modules/smart-npm/bin/smart-npm.js

[email protected] postinstall /root/.nvm/versions/node/v6.0.0/lib/node_modules/smart-npm
node scripts/helper.js postinstall

fs.js:1083
return binding.unlink(pathModule._makeLong(path));
^

Error: EACCES: permission denied, unlink '/root/.nvm/versions/node/v6.0.0/bin/npm'
at Error (native)
at Object.fs.unlinkSync (fs.js:1083:18)
at postInstall (/root/.nvm/versions/node/v6.0.0/lib/node_modules/smart-npm/scripts/helper.js:89:34)
at Object. (/root/.nvm/versions/node/v6.0.0/lib/node_modules/smart-npm/scripts/helper.js:136:23)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Function.Module.runMain (module.js:575:10)
/root/.nvm/versions/node/v6.0.0/lib
└── (empty)

npm ERR! Linux 2.6.32-431.20.3.el6.x86_64
npm ERR! argv "/root/.nvm/versions/node/v6.0.0/bin/node" "/root/.nvm/versions/node/v6.0.0/bin/npm" "install" "--global" "smart-npm" "--registry=https://registry.npm.taobao.org/"
npm ERR! node v6.0.0
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: node scripts/helper.js postinstall
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node scripts/helper.js postinstall'.
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 smart-npm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/helper.js postinstall
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs smart-npm
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls smart-npm
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log
npm ERR! code 1

we must check into the path where npm locate

npm install express --save
...
npm WARN saveError ENOENT: no such file or directory, open 'd:\node\package.json'

we must check into the path where npm locate
cd node_modules\npm

cnpm registry  是不是可以去掉了?

使用snpm以后是不是可以去掉.npmrc中的registry呢
registry=https://registry.npm.taobao.org

以下环境变量是不是也可以去掉了

export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/dist
export NVM_IOJS_ORG_MIRROR=https://npm.taobao.org/mirrors/iojs

奇怪的是,使用的淘宝的registry,npm search一用就报错,真不知道是为何。
正是由于这问题,才google到snpm。

无法安装成功

请看下面的错误:
运行环境是 virtualbox, ubuntu 17.04 32bit, node v8.0.0, npm 5.0.3

edwin@edwin-VirtualBox:~$ sudo npm install --global smart-npm --registry=https://registry.npm.taobao.org/

> [email protected] preinstall /usr/local/lib/node_modules/smart-npm
> npm config set registry https://registry.npm.taobao.org/

npm ERR! path /usr/local/etc/npmrc
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall open
npm ERR! Error: EACCES: permission denied, open '/usr/local/etc/npmrc'
npm ERR!  { Error: EACCES: permission denied, open '/usr/local/etc/npmrc'
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'open',
npm ERR!   path: '/usr/local/etc/npmrc' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

┌─────────────────────────────────────────────────────────┐
│                 npm update check failed                 │
│           Try running with sudo or get access           │
│          to the local update config store via           │
│ sudo chown -R $USER:$(id -gn $USER) /home/edwin/.config │
└─────────────────────────────────────────────────────────┘

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/edwin/.npm/_logs/2017-06-14T12_57_16_538Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 243
npm ERR! [email protected] preinstall: `npm config set registry https://registry.npm.taobao.org/`
npm ERR! Exit status 243
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/edwin/.npm/_logs/2017-06-14T12_57_38_699Z-debug.log

An in-range update of snyk is breaking the build 🚨

Version 1.35.0 of snyk just got published.

Branch Build failing 🚨
Dependency snyk
Current Version 1.34.4
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

snyk is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build is in progress Details
  • continuous-integration/appveyor/branch AppVeyor build failed Details

Release Notes v1.35.0

<a name"1.35.0">

1.35.0 (2017-06-20)

Bug Fixes

  • support --dev when running in maven projects (ff6e063e)
  • missing equal sign for the org parameter (387d537b)

Features

  • support SBT package manager (b461b84a)
Commits

The new version differs by 3 commits.

  • ff6e063 fix: support --dev when running in maven projects
  • b461b84 feat: support SBT package manager
  • 387d537 fix: missing equal sign for the org parameter

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

windows下安装后出错

windows下,生成的快捷方式直接指向的是smart-npm.js,如果windows的js默认不是由node.exe执行的话,那么就会出现安装后npm不能用的问题。

Centos 7 安装失败

npm ERR! Error: EACCES: permission denied, open '/usr/local/etc/npmrc'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, open '/usr/local/etc/npmrc']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'open',
npm ERR! path: '/usr/local/etc/npmrc' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

然,/usr/local/etc/下并没有npmrc文件。

OS:Centos 7.0
User:root
node version:v4.5.0
npm version:2.15.9

windows下 snpm install-npm报错

>snpm install-npm
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: spawn npm ENOENT
    at _errnoException (util.js:992:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3

读取缓存问题

snpm可以在本地缓存过的情况下,优先读取本地缓存吗?

关于更新了npm之后snpm -v的显示内容的问题

我更新了我的npm

~$ npm -v
5.0.2

不过snpm里的npm还是旧版本的

 ~$ snpm -v
 npm:  4.4.4
 smart-npm:  3.0.1

这样有什么影响么?我现在使用snpm的时候,用的是高版本的npm还是低版本的npm呀?

希望对 npm 命令路径的处理更智能些

z at ZsMBP in ~ 
$ yarn global bin
/usr/local/bin

z at ZsMBP in ~ 
$ snpm
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn /Users/z/.config/yarn/global/node_modules/.bin/npm ENOENT
    at exports._errnoException (util.js:1012:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:577:11)
    at run (bootstrap_node.js:352:7)
    at startup (bootstrap_node.js:144:9)
    at bootstrap_node.js:467:3

其实我觉得npm慢是npm程序本身的问题

之前我把npm 的源换成淘宝的 也用了 smart-npm 速度确实要快很多 但是他会不定时的假死 就卡在那一直不动 等多久都不会动 挂vpn 都没用
我用 cnpm 嗖嗖的就装完了 但是cnpm 只能用来 自己install 包 像一些要使用npm的程序 还是要使用 npm 我现在3天了 像 create-react-app 这样的我就没有成功过

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.