Skip to content
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

Error: Cannot find module 'typeorm' #403

Open
yasserlens opened this issue Apr 19, 2024 · 9 comments
Open

Error: Cannot find module 'typeorm' #403

yasserlens opened this issue Apr 19, 2024 · 9 comments
Labels
Not yet supported Vendure version The plugin hasn't been updated to support this version of Vendure yet

Comments

@yasserlens
Copy link

Which plugin/repository is the issue about?
vendure-plugin-google-cloud-tasks - but it could be affecting other plugins that I don't use.

Describe the bug
After upgrading to the latest vendure version 2.2.0, I'm getting the following error at startup:
Error: Cannot find module 'typeorm'
Require stack:

  • /.../node_modules/@pinelab/vendure-plugin-google-cloud-tasks/dist/cloud-tasks-service.js
  • /.../node_modules/@pinelab/vendure-plugin-google-cloud-tasks/dist/cloud-tasks-job-queue.strategy.js
  • /.../node_modules/@pinelab/vendure-plugin-google-cloud-tasks/dist/cloud-tasks.plugin.js
  • /.../src/vendure-config.ts

To Reproduce
Upgrade to Vendure to v2.2.0, run the app

Expected behavior
No errors at startup..

Temporary Solution
install typeorm in your vendure project's root as a temp solution until typeorm is included in cloud-tasks / other plugins:

npm install typeorm

Environment

  • NodeJS version 20.9.0
  • Vendure version: 2.2.0
  • Plugin version: 1.5.0
  • Database Postgres

Additional context
I don't see typeorm included in the plugins - I assume it should be inherited from Vendure but I'm not sure why it's not anymore in v2.2.

@martijnvdbrug
Copy link
Member

Hi, thanks for your issue report.

Strange indeed, I do see that the typeorm package is still part of vendure/core, so that is the one that we should be using. Installing another version of TypeOrm sounds fishy, make sure you have the same version as v2.2!

That said, we still have to upgrade all plugins to work with v2.2, so I hope this will be tackled when that is done. Expect it somewhere in the coming 3 weeks

@yasserlens
Copy link
Author

Thanks Martijn!
Looking forward to seeing the update :)

@martijnvdbrug martijnvdbrug added the Not yet supported Vendure version The plugin hasn't been updated to support this version of Vendure yet label Jun 22, 2024
@martijnvdbrug
Copy link
Member

@yasserlens Do you still experience this issue with the latest version of this plugin?

@yasserlens
Copy link
Author

@martijnvdbrug Thanks for checking! Let me test and let you know. I did not install updates for a few months now.

@yasserlens
Copy link
Author

I'm waiting for a Stripe plugin fix to update Vendure and the plugin - this should be done within the week pending Vendure new version release.

@yasserlens
Copy link
Author

I just tried again:

npm uninstall typeorm

Deleted node_modules and package-lock.json

npm i

then ran the server locally (dev) - failed again with the same issue looking for typeorm.

Installed it again, and the error went away.

I'm on version -> @pinelab/vendure-plugin-google-cloud-tasks @ 1.7.1
vendure version 3.0.5

@yasserlens
Copy link
Author

Also worth mentioning - I'm finding it hard to know the most recent version for each of the packages without a change log

@martijnvdbrug
Copy link
Member

I've heard more problems like this. I will keep the issue open and investigate.

@martijnvdbrug
Copy link
Member

martijnvdbrug commented Nov 30, 2024

Also worth mentioning - I'm finding it hard to know the most recent version for each of the packages without a change log

Relatable... Do you have any suggestions? I'm trying to adhere to semver for each package.

Https://plugins.pinelab.studio might help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Not yet supported Vendure version The plugin hasn't been updated to support this version of Vendure yet
Projects
None yet
Development

No branches or pull requests

2 participants