mrwerdo opened a new issue, #560:
URL: https://github.com/apache/casbin-node-casbin/issues/560

   Hello,
   
   I'm trying to use this library with Cloudflare Workers using their Vite 
plugin however it's resulting in an obscure import error. I've created a 
minimal example here: https://github.com/mrwerdo/Casbin-Vite
   
   Steps to reproduce are:
   1. `npx wrangler init`
   2. `npm install casbin`
   3. `npm install -D vite @cloudflare/vite-plugin wrangler`
   4. Continue following the instructions here: 
https://developers.cloudflare.com/workers/vite-plugin/get-started/
   5. Import `casbin`.
   
   Running `npm run dev` produces the following message:
   ```
   error when starting dev server:
   ReferenceError: require is not defined
       at runInRunnerObject (workers/runner-worker/index.js:107:3)
       at getWorkerEntryExportTypes (workers/runner-worker/index.js:246:24)
       at null.<anonymous> (workers/runner-worker/index.js:350:37)
       at maybeCaptureError (workers/runner-worker/index.js:51:10)
   ```
   
   Thanks for your time 🙂 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to