Comments (5)
I'm not sure I follow the request. Do you mean update the package.json to use node server.js for the start command?
from subscription-use-cases.
The README says to use npm start
for Node, but if you do it you'll got this errors:
lsoave@basenode:~/STRIPE/subscription-use-cases/fixed-price-subscriptions/server/node$ npm start server
> [email protected] start
> yarn server "server"
sh: 1: yarn: not found
lsoave@basenode:~/STRIPE/subscription-use-cases/fixed-price-subscriptions/server/node$ npm start start
> [email protected] start
> yarn server "start"
sh: 1: yarn: not found
lsoave@basenode:~/STRIPE/subscription-use-cases/fixed-price-subscriptions/server/node$ npm start test
> [email protected] start
> yarn server "test"
sh: 1: yarn: not found
because your package.json has yarn and npm mixed up ... which is confusing:
...
"scripts": {
"server": "node server/node/server.js",
"reactClient": "cd client/react && npm start",
"startReact": "concurrently \"yarn reactClient\" \"yarn server\"",
"startVanillajs": "yarn server",
"start": "yarn server",
"test": "echo \"Error: no test specified\" && exit 1"
},
...
You also have two different package.json (also slightly different) in two different path:
lsoave@basenode:~/STRIPE/subscription-use-cases/fixed-price-subscriptions$ diff ./package.json server/node/package.json
2c2
< "name": "stripe-subscription-with-fixed-price",
---
> "name": "subscriptions-with-fixed-prices",
7,8c7,8
< "server": "node server/node/server.js",
< "reactClient": "cd client/react && npm start",
---
> "server": "node server.js",
> "reactClient": "cd ../../client/react && npm start",
24a25,27
> },
> "devDependencies": {
> "@fullhuman/postcss-purgecss": "^2.1.2"
from subscription-use-cases.
I say, just use one or the other (and in one place only). In my case :
lsoave@basenode:~/STRIPE/subscription-use-cases/fixed-price-subscriptions/server/node$ cat ./package.json
{
"name": "subscriptions-with-fixed-prices",
"version": "1.0.0",
"description": "A Stripe sample implementing cards for subscriptions with fixed prices.",
"main": "server.js",
"scripts": {
"server": "node server.js",
"reactClient": "cd ../../client/react && npm start",
"startReact": "concurrently \"npm run reactClient\" \"npm run server\"",
"startVanillajs": "npm run server",
"start": "npm run server",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "stripe-demos",
"license": "ISC",
"dependencies": {
"autoprefixer": "^9.7.6",
"body-parser": "^1.19.0",
"concurrently": "4.1.2",
"cookie-parser": "^1.4.5",
"dotenv": "^8.0.0",
"express": "^4.17.1",
"postcss-cli": "^7.1.1",
"stripe": "^7.4.0"
},
"devDependencies": {
"@fullhuman/postcss-purgecss": "^2.1.2"
}
}
lsoave@basenode:~/STRIPE/subscription-use-cases/fixed-price-subscriptions/server/node$ npm start
> [email protected] start
> npm run server
> [email protected] server
> node server.js
Node server listening on port http://localhost:4242!
from subscription-use-cases.
But now I get the subscription process hanging forever.
I opened an issue here #100
from subscription-use-cases.
Removed the yarn dependencies and the postcss dependencies that aren't used anymore. Also added some error handling to the node example.
from subscription-use-cases.
Related Issues (20)
- Migrate to default_incomplete
- Add steps for creating Prices with `lookup_keys` HOT 7
- Change to Intraday schema HOT 2
- can't get to prices.html HOT 1
- Fixed price / React / Ruby sample quite broken. HOT 5
- Changing subscription does not work
- live-mode API keys not work in kubernetes cluster HOT 1
- Clients don't work HOT 7
- clientSecret should not be passed as a queryPararm? HOT 2
- Php solution doesn't work HOT 2
- Inconsistent SDK usage. HOT 2
- Google Pay OR Apple Pay button is not showing. HOT 1
- Conversion Issue: Error CS0019 Operator '==' cannot be applied to operands of type 'long' and 'DateTime'
- Subscription creation request fails with customer credit balance (or 100% coupon) HOT 1
- [feature request] Add name field to registration page
- [feature request] Enrich customer creation samples HOT 1
- [feature request] update sample app to use `payment-element`
- Stripe CLI setup Fixed Priced Subs with Node + React not working HOT 7
- HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process)
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 subscription-use-cases.