Skip to content
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

找不到runkoa模块 #8

Open
git-lt opened this issue Jul 12, 2016 · 1 comment
Open

找不到runkoa模块 #8

git-lt opened this issue Jul 12, 2016 · 1 comment

Comments

@git-lt
Copy link

git-lt commented Jul 12, 2016

runkoa bin/www

bin/www
3babel presets path = /usr/local/lib/node_modules/runkoa/node_modules/
module.js:328
throw err;
^

Error: Cannot find module 'runkoa'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (www:3:1)
at Module._compile (module.js:398:26)
at loader (/usr/local/lib/node_modules/runkoa/node_modules/babel-register/lib/node.js:158:5)
at Object.require.extensions.(anonymous function) [as .js]
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
本地的package.json 和node_modules下都没有runkoa的依赖

是否需要也在本地安装一下runkoa?

我尝试本地安装 npm install runkoa --save 后执行 runkoa bin/www 还是报错
runkoa bin/www

bin/www
3babel presets path = /Users/liutao/work/velocity_static_koa/node_modules/.npminstall/runkoa/1.5.2/runkoa/node_modules/
/Users/liutao/work/velocity_static_koa/app.js
2babel presets path = /Users/liutao/work/velocity_static_koa/node_modules/.npminstall//1.5.2/runkoa
/Users/liutao/work/velocity_static_koa/node_modules/.npminstall/babel-core/6.10.4/babel-core/lib/transformation/file/options/option-manager.js:204
throw new ReferenceError(messages.get("pluginUnknown", plugin, loc, i, dirname));
^

ReferenceError: Unknown plugin "/Users/liutao/work/velocity_static_koa/node_modules/.npminstall//1.5.2/runkoababel-plugin-add-module-exports" specified in "base" at 0, attempted to resolve relative to "/Users/liutao/work/velocity_static_koa"
at /Users/liutao/work/velocity_static_koa/node_modules/.npminstall/babel-core/6.10.4/babel-core/lib/transformation/file/options/option-manager.js:204:17
at Array.map (native)
at Function.normalisePlugins (/Users/liutao/work/velocity_static_koa/node_modules/.npminstall/babel-core/6.10.4/babel-core/lib/transformation/file/options/option-manager.js:180:20)
at OptionManager.mergeOptions (/Users/liutao/work/velocity_static_koa/node_modules/.npminstall/babel-core/6.10.4/babel-core/lib/transformation/file/options/option-manager.js:300:36)
at OptionManager.init (/Users/liutao/work/velocity_static_koa/node_modules/.npminstall/babel-core/6.10.4/babel-core/lib/transformation/file/options/option-manager.js:488:10)
at compile (/Users/liutao/work/velocity_static_koa/node_modules/.npminstall/babel-register/6.9.0/babel-register/lib/node.js:112:69)
at loader (/Users/liutao/work/velocity_static_koa/node_modules/.npminstall/babel-register/6.9.0/babel-register/lib/node.js:158:14)
at Object.require.extensions.(anonymous function) as .js
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/Cellar/node/5.4.0/bin/node" "/usr/local/bin/npm" "run" "start"
npm ERR! node v5.4.0
npm ERR! npm v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! velocity_static_koa@1.0.0 start: runkoa bin/www
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the velocity_static_koa@1.0.0 start script 'runkoa bin/www'.
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 velocity_static_koa package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! runkoa bin/www
npm ERR! You can get their info via:
npm ERR! npm owner ls velocity_static_koa
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/liutao/work/velocity_static_koa/npm-debug.log

runkoa app 执行提示找不下入口,runkoa bin/www 又提示babel-polyfill的实例重复

难道是这个插件不能和现有的koa项目使用吗?我的koa 是1.2.0的版本

velocity_static_koa runkoa app
app
3babel presets path = /usr/local/lib/node_modules/runkoa/node_modules/
runkoa entry file is not exist, please check it
➜ velocity_static_koa runkoa bin/www
bin/www
3babel presets path = /usr/local/lib/node_modules/runkoa/node_modules/
/Users/liutao/work/velocity_static_koa/app.js
/Users/liutao/work/velocity_static_koa/node_modules/.npminstall/babel-polyfill/6.9.1/babel-polyfill/lib/index.js:12
throw new Error("only one instance of babel-polyfill is allowed");
^

Error: only one instance of babel-polyfill is allowed
at Object. (/Users/liutao/work/velocity_static_koa/node_modules/.npminstall/babel-polyfill/6.9.1/babel-polyfill/lib/index.js:12:9)
at Module._compile (module.js:398:26)
at Module._extensions..js (module.js:405:10)
at Object.require.extensions.(anonymous function) as .js
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/Users/liutao/work/velocity_static_koa/node_modules/.npminstall/runkoa/1.5.2/runkoa/index.js:3:1)
at Module._compile (module.js:398:26)

@guotingchao
Copy link

我也遇到同样的问题 。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants