-
Notifications
You must be signed in to change notification settings - Fork 227
Open
Description
I've added migrate to my package json so that it always passes in the correct store, complier and template options¹
If I try to use it directly, eg:
{
"scripts": {
"migrate-create": "migrate create --template-file=\"./migrations-meta/template.ts\" --compiler=\"ts:./migrations-meta/compiler.js\"",
}
}
When I run it with yarn 2 I get the following error
$ yarn run migrate-create test
internal/child_process.js:407
throw errnoException(err, 'spawn');
^
Error: spawn ENOTDIR
at ChildProcess.spawn (internal/child_process.js:407:11)
at spawn (child_process.js:548:9)
at Command.executeSubCommand (./.yarn/cache/commander-npm-2.20.3-d8dcbaa39b-b73428e97d.zip/node_modules/commander/index.js:562:14)
at Command.parse (./.yarn/cache/commander-npm-2.20.3-d8dcbaa39b-b73428e97d.zip/node_modules/commander/index.js:488:17)
at Object.<anonymous> (./.yarn/cache/migrate-npm-1.7.0-d0c8b01ed6-666dcd3e4d.zip/node_modules/migrate/bin/migrate:15:4)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.external_module_.Module._load (./.pnp.js:20698:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
errno: 'ENOTDIR',
code: 'ENOTDIR',
syscall: 'spawn'
}
I have a work around by prefixing migrate with npx
which then installs and runs a global version of migrate.
We're using yarn 2 with pnp, however other binaries run ok. Did I miss something?
¹ Is there a runtime configuration (rc) file that I missed or isn't not documented so that I don't have to do this?
Metadata
Metadata
Assignees
Labels
No labels