stripe-samples / stripe-node-cloudflare-worker-template

Use stripe-node in a Cloudflare Worker.
MIT License
77 stars 16 forks source link

Build Fail - Could not resolve "Stripe" #5

Closed royboy789 closed 1 year ago

royboy789 commented 1 year ago

Bug report

Describe the bug

Fresh install using steps in README. Tried to convert the require to ES6 import.

No matter what, on build I get a build failure with src/index.js:1:23: ERROR: Could not resolve "stripe"

A clear and concise description of what the bug is. Cannot build after generating project

To Reproduce

Follow instructions in README

  1. Run generate command
  2. Add [vars]
  3. Run wrangler dev or wrangler publish
  4. Experience build failure

Expected behavior

Not fail the build

Screenshots

Screen Shot 2023-01-20 at 11 16 01 PM

System information

royboy789 commented 1 year ago

Closing, running npm install fixed it.