$ npm run artisan test
> [email protected] artisan /root/serve/name-server
> egg-artisan "test"
: 没有那个文件或目录
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] artisan: `egg-artisan "test"`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] artisan script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
egg-project
├── app
│ ├── artisan
│ | ├── test.js
// test.js
import Command from 'egg-artisan';
class TestCommand extends Command {
constructor(rawArgv) {
super(rawArgv);
}
async run() {
console.log('====run=====');
}
}
export default TestCommand;
"egg": "^2.6.1",
"egg-artisan": "^1.0.5",