porfirioribeiro / gatsby-plugin-netlify-functions Goto Github PK
View Code? Open in Web Editor NEWPlugin to use netlify functions in gatsby
License: MIT License
Plugin to use netlify functions in gatsby
License: MIT License
In the readme, is that supposed to read: "With the release of netlify dev this package should NOT..."
Need to figure out a way to fix the POST requests not having the body parsed.
In #1 @willcosgrove tried to fix it, but it needs more investigation
I created a file called .env
in gatsby root with the contents:
PIZZA=cheese
Then ran gatsby develop
and then within a function tried to get the environment variable like normal:
const { PIZZA } = process.env;
But when i console.log(PIZZA), it shows as undefined.
Am I doing something wrong? Trying to access ENV variables for some API secret keys.
Does this support building of node modules? In production it seems to fail:
{
"errorMessage": "Cannot find module 'shopify-token'",
"errorType": "Error",
"stackTrace": [
"Function.Module._load (module.js:474:25)",
"Module.require (module.js:596:17)",
"require (internal/module.js:11:18)",
"Object.<anonymous> (/var/task/auth.js:3:20)",
"Module._compile (module.js:652:30)",
"Object.Module._extensions..js (module.js:663:10)",
"Module.load (module.js:565:32)",
"tryModuleLoad (module.js:505:12)",
"Function.Module._load (module.js:497:3)"
]
}
Where my code looks like:
var ShopifyToken = require('shopify-token');
And in package.json:
"shopify-token": "^3.0.3",
It works in gatsby develop but not once built on Netlify.
hi! i work at netlify.
we launched netlify dev in april and that should make it a lot easier for many people to use netlify functions without having to use a transpile step.
we are workign on removing this in our gatsby starter: decaporg/gatsby-starter-decap-cms#273
wonder if you'd like to point people to netlify dev too!
The Gatsby Netlify Function ReadMe states that , "With the release of netlify dev this package should be used anymore".
The wording of this sentence is slightly confusing. Does this mean a developer should still use the Gatsby Netlify Functions Plugin, or should one use Netlify Dev?
I wonder if anyone else has experienced this:
gatsby build
When I tried updated to @babel/core 7.3.3 today, I got this error message:
Plugin gatsby-plugin-netlify-functions returned an error: "Cannot find module '@babel/preset-typescript'"
I suppose I could add it to my package.json but gatsby-plugin-netlify-functions
loads that dependency itself. So, I've not needed it in my own package.json before.
Any advice would be helpful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.