Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–223 runs
build_error
glibcnode 18–223 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default
✓ in package.json: { "egg": { "framework": "egg-qeelyn-framework" } }
✗ expecting npm require('egg-qeelyn-framework') as module
Not imported directly; used as Egg.js framework via package.json egg.framework field.
ctx.helper.jsonResult
✓ ctx.helper.jsonResult(data, error)
✗ ctx.helper.json(data, error)
Available after proper framework setup; defined in extend/helper.js.
app.middleware.qeelynApiAuth
✓ app.middleware.qeelynApiAuth()
✗ app.middleware.qeelynApiAuth
Must call as function to get middleware.
Shows how to set up framework, configure, define routes, and use built-in controllers and middleware.
// package.json
{
"name": "my-app",
"egg": {
"framework": "egg-qeelyn-framework"
},
"dependencies": {
"egg": "^2.0.0",
"egg-qeelyn-framework": "^1.6.0"
}
}
// config/config.default.js
'use strict';
module.exports = appInfo => {
const config = {};
config.keys = appInfo.name + '_v1.0.0';
config.appCode = 'myAppCode';
// required for JWT auth: public key
config.publicKeyPath = require('path').join(appInfo.baseDir, 'config/rsa_pub.pem');
config.api = {
deoGateway: 'https://gateway.example.com',
ucenterAuth: 'https://ucenter.example.com',
};
config.pageConfig = {
loginUrl: 'https://login.example.com',
ucenterHost: 'https://ucenter.example.com',
};
config.cache = {
redis: {
port: 6379,
host: '127.0.0.1',
db: 0,
},
};
return config;
};
// app/router.js
'use strict';
module.exports = app => {
const { router, controller } = app;
// Use built-in controllers
router.post('/qeelyn-framework/usercenter-api', controller.qeelynFrameworkApi.ucenterApi);
router.get('/qeelyn-framework/logout', controller.qeelynFrameworkApi.logout);
router.get('/qeelyn-framework/log', controller.qeelynFrameworkApi.log);
router.post('/qeelyn-framework/spm', controller.qeelynFrameworkApi.spm);
// Use middleware for API routes
const qeelynApiAuth = app.middleware.qeelynApiAuth();
const qeelynValidSign = app.middleware.qeelynValidSign();
const qeelynLog = app.middleware.qeelynLog();
router.post('/api/protected', qeelynValidSign, qeelynLog, qeelynApiAuth, controller.api.index);
};
egg-bin --version
Errors
Common errors & fixes
Error: Can't find module 'egg-qeelyn-framework' required by 'egg'
Missing or incorrect package.json 'egg.framework' field, or package not installed.
fixEnsure egg-qeelyn-framework is added to dependencies and package.json has { "egg": { "framework": "egg-qeelyn-framework" } } Error: ENOENT: no such file or directory, open '.../config/rsa_pub.pem'
Missing RSA public key file needed for JWT verification.
fixPlace a valid RSA public key file at app/config/rsa_pub.pem (or update config.publicKeyPath).
TypeError: app.middleware.qeelynApiAuth is not a function
Middleware accessed without parenthesis — it returns a middleware factory, not a direct middleware.
fixUse app.middleware.qeelynApiAuth() to get the middleware function.
Error: connect ECONNREFUSED 127.0.0.1:6379
Redis connection failure when using SPM or cache. Framework assumes Redis is configured.
fixEither configure Redis properly in config.cache.redis or disable features that require Redis.
Audit
Dependencies
eggrequiredPeer dependency; the framework extends egg.