Comments (3)
Dear Omise team, any update for this PR to fix the #141 issue? This PR could save anybody using NextJS and deploy to the Vercel Hosting.
from omise-node.
I just tried this out again by deploying a minimal Next.js app to Vercel. Using this library in an API route causes the route to crash with a 500 error (see below). So just an FYI, this library still doesn't seem to work with Next.js deployed on Vercel.
Should be fixed by #166, although I only tested this fix a long time ago so cannot be 100% sure (given that Next.js versions have increased a lot since then).
2022-11-17T01:19:18.593Z e7387498-a0d1-4a63-a775-f05eefa8ea88 ERROR Error: Cannot find module './resources/Source'
Require stack:
- /var/task/node_modules/omise/lib/apiResources.js
- /var/task/node_modules/omise/index.js
- /var/task/.next/server/pages/api/hello.js
- /var/task/node_modules/next/dist/server/next-server.js
- /var/task/___next_launcher.cjs
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.mod._resolveFilename (/var/task/node_modules/next/dist/build/webpack/require-hook.js:23:32)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at resourceName (/var/task/node_modules/omise/lib/apiResources.js:7:10)
at Object.module.exports.omiseResources (/var/task/node_modules/omise/lib/apiResources.js:40:14)
at module.exports (/var/task/node_modules/omise/index.js:5:19)
at handler (/var/task/.next/server/pages/api/hello.js:26:46)
at Object.apiResolver (/var/task/node_modules/next/dist/server/api-utils/node.js:367:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async NextNodeServer.runApi (/var/task/node_modules/next/dist/server/next-server.js:474:9)
at async Object.fn (/var/task/node_modules/next/dist/server/next-server.js:736:37)
at async Router.execute (/var/task/node_modules/next/dist/server/router.js:252:36)
at async NextNodeServer.run (/var/task/node_modules/next/dist/server/base-server.js:384:29)
at async NextNodeServer.handleRequest (/var/task/node_modules/next/dist/server/base-server.js:322:20) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/var/task/node_modules/omise/lib/apiResources.js',
'/var/task/node_modules/omise/index.js',
'/var/task/.next/server/pages/api/hello.js',
'/var/task/node_modules/next/dist/server/next-server.js',
'/var/task/___next_launcher.cjs'
]
}
from omise-node.
Fixed by #190.
from omise-node.
Related Issues (20)
- Migrate to CircleCI 2.0
- Cannot call create from omise.schedules HOT 1
- Fix dns uncaught exception HOT 3
- agent-base monkey patch breaks HTTPS requests
- IDE suggests a wrong attribute HOT 1
- Missing IRequest HOT 1
- Refund missing argument HOT 1
- Destroy method missing from ISchedulesAPI interface
- Property "on" in ICreateSchedule interface it can not be optional property HOT 1
- Omise.Schedules.ICreateSchedule does not allow an optional charge field
- interface ICharge not update HOT 1
- Creating Charge with Source in a single request HOT 1
- Charge with card HOT 1
- Options to config Omise API host HOT 1
- authorize_uri does not work. HOT 3
- Interface ICharge did not return status attribute. HOT 2
- Add missing recipients.create type HOT 1
- When trying to create resource omise.sources.create(source) giving me authentication failure error HOT 4
- I have problem in usd currency about fraction of amout HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omise-node.