package.json 的 scripts 里 这个配置的
"scripts": {
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
"dev:mp-ali-plugin": "yarn dev:custom mp-ali-plugin --plugin"
}
下面是执行结果:
kim@kimdeMacBook-Pro tinyzk-2c-app % yarn dev:mp-ali-plugin
yarn run v1.22.11
warning ../../../../../package.json: No license field
$ yarn dev:custom mp-ali-plugin --plugin
warning ../../../../../package.json: No license field
$ cross-env NODE_ENV=development uniapp-cli custom mp-ali-plugin --plugin
events.js:377
throw er; // Unhandled 'error' event
^
Error: spawn uniapp-cli ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn uniapp-cli',
path: 'uniapp-cli',
spawnargs: [ 'custom', 'mp-ali-plugin', '--plugin' ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
9***@qq.com (作者)
之前没有添加,添加后,还是报错,麻烦您在帮忙看一下
2022-06-02 15:50