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
Can't run typeorm-ts-node-commonjs CLI script in docker node container #8818
Comments
maybe you do not have |
I have the same problem |
Same on CI :( |
…node-esm` on some linux distros Changed to nodejs workaround instead of relying on shebang parameters, as they work a bit differently on some linux distros, and using the "-S" parameter breaks the CLI on Windows Closes typeorm#8818
I've opened PR #8821 to fix this issue |
@pleerock the result is the same if FROM node:16.14.2
WORKDIR /usr/src/app
RUN echo "{\"dependencies\":{\"ts-node\":\"10.7.0\",\"typeorm\":\"0.3.4\"},\"scripts\":{\"typeorm\":\"typeorm-ts-node-commonjs\"}}" > package.json
RUN npm i
RUN npm run typeorm As mentioned by @giladgd in #8821 the issue is caused by incompatibility of shebang parameters across various linux distros. |
…node-esm` on some linux distros (typeorm#8821) Changed to nodejs workaround instead of relying on shebang parameters, as they work a bit differently on some linux distros, and using the "-S" parameter breaks the CLI on Windows Closes typeorm#8818
Fixed in https://github.com/typeorm/typeorm/releases/tag/0.3.5, thanks! |
Issue Description
Expected Behavior
Should be able to run CLI commands from within docker containers.
Actual Behavior
My CI/CD pipeline now fails to run the
typeorm migration:run
command with the following error:Steps to Reproduce
Create a Dockerfile with the following content and try to build it:
My Environment
windows 10
node 16.14.2
docker desktop 4.6.1
Additional Context
#8776
Relevant Database Driver(s)
n/a
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: