Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I see this error after deploying to netlify . .. I did add business name as request as well in stripe #9

Open
farmboyadmin opened this issue Sep 24, 2021 · 4 comments

Comments

@farmboyadmin
Copy link

I have the account set up .. still its giving the error

I see these in the Developer Tools ..
{"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module 'stripe'\nRequire stack:\n- /var/task/create-checkout.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js","trace":["Runtime.ImportModuleError: Error: Cannot find module 'stripe'","Require stack:","- /var/task/create-checkout.js","- /var/runtime/UserFunction.js","- /var/runtime/index.js"," at _loadUserApp (/var/runtime/UserFunction.js💯13)"," at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)"," at Object. (/var/runtime/index.js:43:30)"," at Module._compile (internal/modules/cjs/loader.js:999:30)"," at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)"," at Module.load (internal/modules/cjs/loader.js:863:32)"," at Function.Module._load (internal/modules/cjs/loader.js:708:14)"," at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)"," at internal/main/run_main_module.js:17:47"]}

And another
(index):1 Uncaught (in promise) IntegrationError: Missing value for Stripe(): apiKey should be a string.
at V ((index):1)
at J ((index):1)
at new e ((index):1)
at Ic ((index):1)
at HTMLFormElement.handleSubmit ((index):186)

@farmboyadmin
Copy link
Author

I downloaded the site , it doesnt have node_modules . inside public .. is that the reason

@cjavilla-stripe
Copy link
Contributor

try running npm install

@farmboyadmin
Copy link
Author

isnt it using
{
"name": "farmboyindustries",
"version": "0.0.1",
"main": "index.js",
"contributors": [],
"scripts": {
"functions": "cd functions && npm i && cd ..",
"dev": "netlify dev",
"webhook": "stripe listen --forward-to localhost:8888/.netlify/functions/handle-purchase"
},
"license": "MIT",
"dependencies": {
"@sendgrid/mail": "^7.0.0",
"stripe": "^8.176.0"
}
}
with ..
[build]
command = "npm run functions"
publish = "public"
functions = "functions"

you want me to change command . ..will it auto install functions ..

@farmboyadmin
Copy link
Author

farmboyadmin commented Sep 24, 2021

This is my repo
https://github.com/farmboyadmin/farmboyreact-store

Locally its all working fine as explained in the read me ...

Also changed to

[build]
command = "npm install"
publish = "public"
functions = "functions"

Still its complaining with the error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants