New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate & Run Doc section doesn't work as described #204
Comments
Hi @Jrfidellis Thanks for reporting this error. npm run migration:generate -- -n TestMigration
> test-app@0.0.0 migration:generate C:\Users\joao.fidellis\Desktop\test-app> ts-node ./node_modules/.bin/typeorm migration:generate "-n" "TestMigration"
C:\Users\joao.fidellis\Desktop\test-app\node_modules.bin\typeorm:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at Object. (C:\Users\joao.fidellis\Desktop\test-app\node_modules\ts-node\src\bin.ts:147:12)
at Module._compile (module.js:652:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-app@0.0.0 migration:generate: ts-node ./node_modules/.bin/typeorm migration:generate "-n" "TestMigration"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test-app@0.0.0 migration:generate script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.` It looks like that this error is specific to TypeORM (see typeorm/typeorm#2316). However as entities are all compiled to JavaScript in FoalTS, I think we can get rid of I updated the {
...
"migration:generate": "./node_modules/.bin/typeorm migration:generate",
"migration:run": "./node_modules/.bin/typeorm migration:run",
"migration:revert": "./node_modules/.bin/typeorm migration:revert"
...
} I tested it on Windows and Mac OS and it seems to work. Could you confirm on your host? |
It's working properly now @LoicPoullain, thanks! |
I took the liberty to open a PL with those changes. |
👌 |
Correcting typeorm scripts - Issue #204
Fixed in v0.6.0-beta.4. |
Running
npm run migration:generate -- -n TestMigration
(as proposed in https://foalts.gitbook.io/docs/databases/generate-and-run-migrations) displays the following error on Windows 10:error.txt
The text was updated successfully, but these errors were encountered: