Closed AubreyHewes closed 7 years ago
When using as runkoa xxx
, runkoa
consider it is in CLI
. So it try to find packages in node_modules
.
But koa-generator
use runkoa
as ./node_modules/.bin/runkoa
,there is no node_modules
under node_modules
if npm's version >= 3.
That's why it gets error.
It's a bug of runkoa
, or we can say it's an incorrect usage of runkoa
.
In a word, one of them need to be fixed.
@i5ting 桑大有空改一下吧,哈哈哈
I tried
Install works fine https://gist.githubusercontent.com/AubreyHewes/fa6881ecd9089482ccc5a26f0ad2e126/raw
Running
npm start
works fine https://gist.githubusercontent.com/AubreyHewes/3498e3ec955cf04ced5cf09e32865b22/rawindex.hbs
)Running
npm run koa
fails... https://gist.githubusercontent.com/AubreyHewes/20f64418bf61213078ad171296a9ee59/rawSo I installed the failing module
babel-plugin-add-module-exports
.. then it fails onbabel-plugin-transform-es2015-modules-commonjs
.. https://gist.githubusercontent.com/AubreyHewes/972d7b3c031d8a59bff1f34dad94e387/rawSo I installed the failing module
babel-plugin-transform-es2015-modules-commonjs
.. it still fails on the same modulebabel-plugin-transform-es2015-modules-commonjs
.. https://gist.githubusercontent.com/AubreyHewes/b5bee5ee974c10fbe2f7c3e26d1845d7/rawI assume it's just not ready for what I tried.. I looked into it a little and koa-views does not seem to support handlebars layouts..
Any tips appreciated, thanks.