New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm i koa-frouter --save 报错 #4

Closed
SuperKieran opened this Issue Feb 23, 2016 · 9 comments

Comments

Projects
None yet
5 participants
@SuperKieran
Copy link

SuperKieran commented Feb 23, 2016

我在win10上安装报如下错误,搜索了半天无果 望解答~安装其他模块都是正常的

$ npm i koa-frouter --save
npm WARN install Couldn't install optional dependency: Unsupported
npm ERR! tar.unpack untar error C:\Dev\nodejs\cache\koa-frouter\0.3.2\package.tgz
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Dev\\nodejs\\node.exe" "C:\\Dev\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i" "koa-frouter" "--save"
npm ERR! node v5.1.0
npm ERR! npm  v3.3.12
npm ERR! path C:\project\fz-back\node_modules\.staging\koa-frouter-197a578b0aea6db2c24e03a5825b68a4\example\router\posts\day\*id.js
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open 'C:\project\fz-back\node_modules\.staging\koa-frouter-197a578b0aea6db2c24e03a5825b68a4\example\router\posts\day\*id.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     C:\project\fz-back\npm-debug.log
@zeroone001

This comment has been minimized.

Copy link

zeroone001 commented Apr 11, 2016

@SuperKieran 是不是没翻墙之类的

@ansenhuang

This comment has been minimized.

Copy link

ansenhuang commented Apr 15, 2016

出现这个问题是因为windows的文件命名不能带有通配符*

@ansenhuang

This comment has been minimized.

Copy link

ansenhuang commented Apr 15, 2016

解决办法:在本项目中download zip,解压index.js和package.json文件到指定目录,npm install,文件命名时以 "" 代替 "*" ,router(app, {root: './router', wildcard: ''}),更改为 "_"。

@sumaolin

This comment has been minimized.

Copy link

sumaolin commented May 10, 2016

@ansenhuang 指定的目录是啥?

@sumaolin

This comment has been minimized.

Copy link

sumaolin commented May 10, 2016

@nswbmw 这个bug 真是@ansenhuang 说的原因造成的吗? 可以修复下嘛!

@nswbmw

This comment has been minimized.

Copy link
Owner

nswbmw commented May 10, 2016

@sumaolin router(app, {root: './router', wildcard: '_'}) 不能运行吗?

@sumaolin

This comment has been minimized.

Copy link

sumaolin commented May 10, 2016

@nswbmw
是window下 npm i koa-kfrouter -g安装的时候报错如下,一直安装不成功

npm ERR! tar.unpack untar error C:\Users\KevinSu\AppData\Roaming\npm-cache\koa-f
router\0.3.2\package.tgz
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\KevinSu\\AppData
\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "i" "koa-frouter" "-g"
npm ERR! node v4.4.3
npm ERR! npm  v3.8.7
npm ERR! path C:\Users\KevinSu\AppData\Roaming\npm\node_modules\.staging\koa-fro
uter-45a4606e\example\router\posts\day\*id.js
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\KevinSu\AppDat
a\Roaming\npm\node_modules\.staging\koa-frouter-45a4606e\example\router\posts\da
y\*id.js'
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\KevinSu\AppDat
a\Roaming\npm\node_modules\.staging\koa-frouter-45a4606e\example\router\posts\da
y\*id.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     F:\Users\dev\bbs\npm-debug.log

没法调用这个模块了。
@ansenhuang 的方法的话,下载的源码要解压到什么目录,是我项目的node_modules目录下,还是根目录下

@nswbmw

This comment has been minimized.

Copy link
Owner

nswbmw commented May 10, 2016

@sumaolin 懂了,example的问题,我发布了 0.3.3了,你安装最新的试试

@sumaolin

This comment has been minimized.

Copy link

sumaolin commented May 10, 2016

@nswbmw OK 可以了!
话说怎么关闭这个issuse

@nswbmw nswbmw closed this May 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment