checkout-netlify-serverless icon indicating copy to clipboard operation
checkout-netlify-serverless copied to clipboard

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

Open farmboyadmin opened this issue 4 years ago • 4 comments

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 avatar Sep 24 '21 16:09 farmboyadmin

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

farmboyadmin avatar Sep 24 '21 18:09 farmboyadmin

try running npm install

cjavilla-stripe avatar Sep 24 '21 18:09 cjavilla-stripe

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 avatar Sep 24 '21 18:09 farmboyadmin

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

farmboyadmin avatar Sep 24 '21 18:09 farmboyadmin