Ask Your Question
1

While trying to execute a typeorm migration command in a Nodejs ubuntu server environment, why am I receiving an error message that says "typeorm: command not found"?

asked 2022-11-02 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-12-04 04:00:00 +0000

lakamha gravatar image

This error message indicates that TypeORM is not installed globally on the server or it is not added to the project's dependencies. To fix this, you can install TypeORM globally by running the following command:

npm install -g typeorm

If you have already installed TypeORM as a project dependency, make sure to include it in the npm script you're using to run the migration command. For example, you can add the following line to the scripts section of your package.json:

"migrate": "typeorm migration:run"

Then you can run the migration command with:

npm run migrate
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-11-02 11:00:00 +0000

Seen: 8 times

Last updated: Dec 04 '22