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
package.json generated by typeorm init has wrong version of ts-node #8820
Comments
I think this line is the cause of the bug: typeorm/src/commands/InitCommand.ts Line 647 in eacecce
However, another fix would be to just make the peerDependency requirement less strict (unless we know that we really do need ts-node 10.7?): Line 152 in eacecce
Maybe just use |
Can concur this is an issue. 🪲 |
Feel free to PR! |
Version rollback to |
Thanks, this works for now. Might be pretty obvious to most, but for anyone new to programming (my experience level one month ago), navigate to a project directory run |
Hey, why it solved with version rollback? |
there is a (looks like a working) solution proposed by @mishagale , no need to confuse users with obviously worse solutions. |
The version needs to be compatible with the peerDependency version in typeorm's own package.json Closes typeorm#8820
@pleerock thanks it really just looked like a working solution. After that other things start conflicting |
I'm guessing that how to implement said solution is obvious to you. Implementing the fix is not going to be obvious to people that are newer to react (and git). Offhand, I didn't know how to implement the proposed fix. There is value in providing a practical solution. A rollback allowed me to continue to program while waiting for the fix to go live. I agree that it's not optimal if major functionality has changed between versions, but it's better than getting stuck. After researching it more, the practical implementation of the proposed solution is: Assuming you're already at the point where the project_folder/node_modules/typeorm/commands/InitCommand.js change the line that reads: to Then navigate back to the project_folder and run |
closed by 7b4bca7 |
Issue Description
It seems like
typeorm init
produces apackage.json
with ts-node version 10.4.0:However, typeorm itself has a peer-dependency for
^10.7.0
:Expected Behavior
running
typeorm init
produces a project skeleton and installs dependenciesActual Behavior
Steps to Reproduce
npm install -g typeorm
typeorm init
Workaround
Edit the generated
package.json
changingto
then manually run
npm install
My Environment
Additional Context
Note that I'm running in WSL - I don't think that's relevant to the issue though.
Relevant Database Driver(s)
N/A
aurora-mysql
aurora-postgres
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: