GithubHelp home page GithubHelp logo

Comments (11)

khrome83 avatar khrome83 commented on June 14, 2024 2

@danieltodonnell - worked like a charm. I did my first transaction too my FaunaDB.

from faunadb-js.

danieltodonnell avatar danieltodonnell commented on June 14, 2024 1

Thanks for reporting this. we will look into it on Monday.

from faunadb-js.

danieltodonnell avatar danieltodonnell commented on June 14, 2024 1

we are cutting 2.9.3 in the next hour or two. For now use the 2.9.3-pre1 prerelease. it is identical to the actual release

from faunadb-js.

khrome83 avatar khrome83 commented on June 14, 2024 1

@danieltodonnell - I really appreciate the responsiveness. Thank you!

from faunadb-js.

danieltodonnell avatar danieltodonnell commented on June 14, 2024 1

Hello everyone, I appreciate your patience with this matter. JS Drivers v2.9.3 have been released
https://www.npmjs.com/package/faunadb/v/2.9.3

This should hopefully address your issues, but if not, please open an issue and we will address it asap (usually the same or next day).

Thank you!

from faunadb-js.

BrunoQuaresma avatar BrunoQuaresma commented on June 14, 2024

@PatrikElfstrom what driver version are you using?

from faunadb-js.

PatrikElfstrom avatar PatrikElfstrom commented on June 14, 2024

I am using v2.9.2

from faunadb-js.

BrunoQuaresma avatar BrunoQuaresma commented on June 14, 2024

@PatrikElfstrom I'm using netlify cli and faunadb v.2.9.2 and the following code is working good.

const { Client, query: q } = require('faunadb')
const db = new Client({ secret: '...' })

exports.handler = async event => {
  if (event.httpMethod !== 'POST') {
    return { statusCode: 405, body: 'Method Not Allowed' }
  }

  const data = JSON.parse(event.body)

  try {
    const { ... } = await db.query(
      q.Let(...)
    )

    return {
      statusCode: 200,
      body: JSON.stringify({ ... }),
    }
  } catch (error) {
    return {
      statusCode: 500,
      body: JSON.stringify({ ... })
    }
  }
}

Can you share with us more details about the tools you are using?

from faunadb-js.

PatrikElfstrom avatar PatrikElfstrom commented on June 14, 2024

from faunadb-js.

PatrikElfstrom avatar PatrikElfstrom commented on June 14, 2024

@BrunoQuaresma Similar error with your code just n(...) is not a function which I guess is the same function.

This is the repo: https://github.com/PatrikElfstrom/schnitzellunch
It's a pretty bog standard create-react-app.
If your going to run that you need to change the urls in src/lambda/restaurants-recrawl.js to http://localhost:8888
And then open http://localhost:8888/.netlify/functions/restaurants-recrawl and you should get the error in the console.

I've tried with node v10.16.3 and v12.13.0 but the same error.
And the row number points me to line 3 here which is the loading of node-fetch

module.exports = global.fetch = global.fetch || (
	typeof process=='undefined' ? (__webpack_require__(/*! unfetch */ "../../node_modules/unfetch/dist/unfetch.mjs").default || __webpack_require__(/*! unfetch */ "../../node_modules/unfetch/dist/unfetch.mjs")) : (function(url, opts) {
		return __webpack_require__(/*! node-fetch */ "../../node_modules/node-fetch/lib/index.mjs")(url.replace(/^\/\//g,'https://'), opts);
	})
);

(And placing .default just after __webpack_require__(...) solves the issue)

from faunadb-js.

khrome83 avatar khrome83 commented on June 14, 2024

I am having this issue also. I spent all day trying to solve it.
@danieltodonnell - are you cutting a release.

from faunadb-js.

Related Issues (20)

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.