manishkatyan / strapi-stripe

Stripe Plugin for Strapi CMS
66 stars 33 forks source link

BUG: Uninstall Strapi-stripe error #44

Closed oDinZu closed 2 years ago

oDinZu commented 2 years ago

strapi-stripe@2.4.1

On uninstalling this plugin, I received an error on yarn develop after yarn install and yarn build. I add the plugin back and error goes away.

Error: Error on attribute strapi_stripe_product in model tag(api::tag.tag): Unknown target plugin::strapi-stripe.strapi-stripe-product

$ strapi develop
Error: Unknown target plugin::strapi-stripe.strapi-stripe-product
    at createJoinTable (/home/name/nodes/strapi/dashboard/node_modules/@strapi/database/lib/metadata/relations.js:393:11)
    at createManyToOne (/home/name/nodes/strapi/dashboard/node_modules/@strapi/database/lib/metadata/relations.js:114:5)
    at createRelation (/home/name/nodes/strapi/dashboard/node_modules/@strapi/database/lib/metadata/relations.js:333:14)
    at createMetadata (/home/name/nodes/strapi/dashboard/node_modules/@strapi/database/lib/metadata/index.js:61:11)
    at new Database (/home/name/nodes/strapi/dashboard/node_modules/@strapi/database/lib/index.js:17:21)
    at Function.Database.init (/home/name/nodes/strapi/dashboard/node_modules/@strapi/database/lib/index.js:77:33)
    at Strapi.bootstrap (/home/name/nodes/strapi/dashboard/node_modules/@strapi/strapi/lib/Strapi.js:392:30)
    at Strapi.load (/home/name/nodes/strapi/dashboard/node_modules/@strapi/strapi/lib/Strapi.js:457:16)
    at async Strapi.start (/home/name/nodes/strapi/dashboard/node_modules/@strapi/strapi/lib/Strapi.js:198:9)
[2022-08-05 12:50:07.697] debug: ⛔️ Server wasn't able to start properly.
[2022-08-05 12:50:07.699] error: Error on attribute strapi_stripe_product in model tag(api::tag.tag): Unknown target plugin::strapi-stripe.strapi-stripe-product
Error: Error on attribute strapi_stripe_product in model tag(api::tag.tag): Unknown target plugin::strapi-stripe.strapi-stripe-product
    at createMetadata (/home/name/nodes/strapi/dashboard/node_modules/@strapi/database/lib/metadata/index.js:68:15)
    at new Database (/home/name/nodes/strapi/dashboard/node_modules/@strapi/database/lib/index.js:17:21)
    at Function.Database.init (/home/name/nodes/strapi/dashboard/node_modules/@strapi/database/lib/index.js:77:33)
    at Strapi.bootstrap (/home/name/nodes/strapi/dashboard/node_modules/@strapi/strapi/lib/Strapi.js:392:30)
    at Strapi.load (/home/name/nodes/strapi/dashboard/node_modules/@strapi/strapi/lib/Strapi.js:457:16)
    at async Strapi.start (/home/name/nodes/strapi/dashboard/node_modules/@strapi/strapi/lib/Strapi.js:198:9)
error Command failed with exit code 1.

at Function.Database.init (/home/name/nodes/strapi/dashboard/node_modules/@strapi/database/lib/index.js:77:33) this plugin doesn't remove the database tables or am I missing something?

oDinZu commented 2 years ago

I removed all product data and still received the same error.

oDinZu commented 2 years ago

I do grep -rnw . -e 'plugin::strapi-stripe.strapi-stripe-product'

I get: ./src/api/tag/content-types/tag/schema.json:39: "target": "plugin::strapi-stripe.strapi-stripe-product",

I discover this even after plugin is removed:

note, i removed the plugin and product from Strapi; I thought maybe the product image was still in database somehow, so I deleted it also from Strapi.

    "strapi_stripe_product": {
      "type": "relation",
      "relation": "manyToOne",
      "target": "plugin::strapi-stripe.strapi-stripe-product",
      "inversedBy": "tags"
    }
oDinZu commented 2 years ago

Removing that code allowed me to start my server without strapi-stripe :hankey: . I will create my own plugin.

Eventyret commented 2 years ago

I think this needs to be raised with the plugin https://github.com/manishkatyan/strapi-stripe

Looks like its not cleaning up on removal,

But would say it's more the plugin then been a strapi issue 😊