a11rew / medusa-payment-paystack

Paystack payment provider for Medusa
https://storefront-production-ae6c.up.railway.app/
MIT License
53 stars 11 forks source link

Build failing pointing to plugin #114

Closed kevinrobert3 closed 6 months ago

kevinrobert3 commented 6 months ago

Builds are failing all of a sudden and checking the logs it points to the plugin. Check the logs Railway message="Initializing API" activity_id="01HSBPB3SX1V9764MZSB32W5DQ" config={} level="info" timestamp="2024-03-19 15:47:37" message="API initialized" activity_id="01HSBPB3SX1V9764MZSB32W5DQ" duration=76 level="info" timestamp="2024-03-19 15:47:37" message="Initializing defaults" activity_id="01HSBPB3X0QXY2NZEGGKSMP89X" config={} level="info" timestamp="2024-03-19 15:47:37" message="You don't have any notification provider plugins installed. You may want to add one to your project." level="warn" timestamp="2024-03-19 15:47:37" message="You don't have any taxProviders provider plugins installed. You may want to add one to your project." level="warn" timestamp="2024-03-19 15:47:37" message="Error starting server" level="error" stack=[{"columnNumber":15,"fileName":"node:internal/modules/cjs/loader","functionName":"Module._resolveFilename","lineNumber":1077,"methodName":"_resolveFilename","native":false,"typeName":"Module"},{"columnNumber":27,"fileName":"node:internal/modules/cjs/loader","functionName":"Module._load","lineNumber":922,"methodName":"_load","native":false,"typeName":"Module"},{"columnNumber":19,"fileName":"node:internal/modules/cjs/loader","functionName":"Module.require","lineNumber":1143,"methodName":"require","native":false,"typeName":"Module"},{"columnNumber":18,"fileName":"node:internal/modules/cjs/helpers","functionName":"require","lineNumber":119,"methodName":null,"native":false,"typeName":null},{"columnNumber":27,"fileName":"/app/node_modules/medusa-payment-paystack/dist/services/paystack-payment-processor.js","functionName":"new PaystackPaymentProcessor","lineNumber":76,"methodName":null,"native":false,"typeName":null},{"columnNumber":99,"fileName":"/app/node_modules/@medusajs/medusa/dist/loaders/helpers/plugins.js","functionName":"container.registerAdd.lifetime","lineNumber":14,"methodName":"lifetime","native":false,"typeName":"container.registerAdd"},{"columnNumber":20,"fileName":"/app/node_modules/awilix/lib/resolvers.js","functionName":"Object.resolve","lineNumber":295,"methodName":"resolve","native":false,"typeName":"Object"},{"columnNumber":37,"fileName":"/app/node_modules/awilix/lib/container.js","functionName":"Object.build","lineNumber":325,"methodName":"build","native":false,"typeName":"Object"},{"columnNumber":73,"fileName":"/app/node_modules/medusa-core-utils/dist/medusa-container.js","functionName":null,"lineNumber":8,"methodName":null,"native":false,"typeName":null},{"columnNumber":null,"fileName":null,"functionName":"Array.map","lineNumber":null,"methodName":"map","native":false,"typeName":"Array"}] timestamp="2024-03-19 15:47:38"

Local logs

You don't have any taxProviders provider plugins installed. You may want to add one to you
⠧ Initializing defaults
error:   Error starting server
Error: Cannot find module 'msw/node'
Require stack:
- /Users/user/Documents/GitHub/admin/node_modules/medusa-payment-paystack/dist/services/paystack-payment-processor.js
- /Users/user/Documents/GitHub/admin/node_modules/@medusajs/medusa/dist/loaders/plugins.js
- /Users/user/Documents/GitHub/admin/node_modules/@medusajs/medusa/dist/loaders/index.js
- /Users/user/Documents/GitHub/admin/node_modules/@medusajs/medusa/dist/commands/start.js
- /opt/homebrew/lib/node_modules/@medusajs/medusa-cli/dist/create-cli.js
- /opt/homebrew/lib/node_modules/@medusajs/medusa-cli/dist/index.js
- /opt/homebrew/lib/node_modules/@medusajs/medusa-cli/cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at new PaystackPaymentProcessor (/Users/user/Documents/GitHub/admin/node_modules/medusa-payment-paystack/dist/services/paystack-payment-processor.js:76:27)
    at container.registerAdd.lifetime (/Users/user/Documents/GitHub/admin/node_modules/@medusajs/medusa/dist/loaders/helpers/plugins.js:14:99)
    at Object.resolve (/Users/user/Documents/GitHub/admin/node_modules/awilix/lib/resolvers.js:295:20)
    at Object.build (/Users/user/Documents/GitHub/admin/node_modules/awilix/lib/container.js:325:37)
    at /Users/user/Documents/GitHub/admin/node_modules/medusa-core-utils/dist/medusa-container.js:8:73
    at Array.map (<anonymous>) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/user/Documents/GitHub/admin/node_modules/medusa-payment-paystack/dist/services/paystack-payment-processor.js',
    '/Users/user/Documents/GitHub/admin/node_modules/@medusajs/medusa/dist/loaders/plugins.js',
    '/Users/user/Documents/GitHub/admin/node_modules/@medusajs/medusa/dist/loaders/index.js',
    '/Users/user/Documents/GitHub/admin/node_modules/@medusajs/medusa/dist/commands/start.js',
    '/opt/homebrew/lib/node_modules/@medusajs/medusa-cli/dist/create-cli.js',
    '/opt/homebrew/lib/node_modules/@medusajs/medusa-cli/dist/index.js',
    '/opt/homebrew/lib/node_modules/@medusajs/medusa-cli/cli.js'
  ]
}
kevinrobert3 commented 6 months ago

This is v1.2.1

kevinrobert3 commented 6 months ago

Installed msw and now build succeeds but get below

Screenshot 2024-03-19 at 19 46 04

Which seems suspicious because i just installed the package with nothing else added. Don't know the implications of the error/warning

kevinrobert3 commented 6 months ago

Checked and msw is listed as a devDependency in plugin am guessing should be a dependency, can you push a fix for this kindly

a11rew commented 6 months ago

Thanks for reporting this, v1.2.3 is out with a fix for this

kevinrobert3 commented 6 months ago

Thank you. Also note the warning in image, again I don't know the implications of the package intercepting the Algolia or other requests. But hope it will be scoped to only Paystack requests

a11rew commented 6 months ago

Yes the plugin isn't intercepting any requests, those were debug changes for tests that made it into the release. You shouldn't see the warnings anymore nor are any requests intercepted.

kevinrobert3 commented 6 months ago

Seen fix. Working