Hey @Dan_Havey –
I don’t know ClickFunnels specifically but I know Node.js/NPM all too well. It sounds like you copy/pasted code that looked something like this:
var Airtable = require('airtable');
Airtable.configure({
endpointUrl: 'https://api.airtable.com',
apiKey: 'YOUR_API_KEY'
});
// etc
The problem is you can’t just throw this JS into an HTML doc and run it. The require
is loading the airtable
package from NPM – this requires a javascript bundler which might be overkill for ya.
I haven’t tested it, but I’d try something like this in your HTML <head>
instead:
<head>
<script src="https://unpkg.com/airtable@0.10.1/build/airtable.browser.js"></script>
</head>
With that, you don’t need the require
line. Airtable
should be available in any script tags anywhere in your HTML document.
Hope that helps / makes sense?
Anthony
Hey @Dan_Havey –
I don’t know ClickFunnels specifically but I know Node.js/NPM all too well. It sounds like you copy/pasted code that looked something like this:
var Airtable = require('airtable');
Airtable.configure({
endpointUrl: 'https://api.airtable.com',
apiKey: 'YOUR_API_KEY'
});
// etc
The problem is you can’t just throw this JS into an HTML doc and run it. The require
is loading the airtable
package from NPM – this requires a javascript bundler which might be overkill for ya.
I haven’t tested it, but I’d try something like this in your HTML <head>
instead:
<head>
<script src="https://unpkg.com/airtable@0.10.1/build/airtable.browser.js"></script>
</head>
With that, you don’t need the require
line. Airtable
should be available in any script tags anywhere in your HTML document.
Hope that helps / makes sense?
Anthony
Thanks, I was able to get it working using Axios to .Get/.Post my data. They also use a file from unpkg.com.
I will save your solution and test it as well…