Giter Club home page Giter Club logo

gatsby-plugin-netlify-functions's People

Contributors

luispagarcia avatar porfirioribeiro avatar tomwritescode avatar willcosgrove avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gatsby-plugin-netlify-functions's Issues

ENV Variables

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.

Support Node Modules?

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.

Plugin gatsby-plugin-netlify-functions returned an error: "Cannot find module '@babel/preset-typescript'"

I wonder if anyone else has experienced this:

  1. Update to module @babel/core 7.3.3 in your Gatsby site
  2. Then try to build: 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.