Comments (11)
@danieltodonnell - worked like a charm. I did my first transaction too my FaunaDB.
from faunadb-js.
Thanks for reporting this. we will look into it on Monday.
from faunadb-js.
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.
@danieltodonnell - I really appreciate the responsiveness. Thank you!
from faunadb-js.
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.
@PatrikElfstrom what driver version are you using?
from faunadb-js.
I am using v2.9.2
from faunadb-js.
@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.
from faunadb-js.
@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.
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)
- provide internal function to "normalize" "data" result
- Property 'requestResult' does not exist on type 'typeof FaunaHTTPError'.
- invalid argument: Regular Class Ref expected, Schema Class Ref provided. HOT 3
- "invalid ref" when using `client.query( Create( Collection('test') ...` HOT 3
- UDF's not showing javascript variables HOT 2
- process.version & process.versions fail build on Vercel Edge API Route HOT 3
- Failing Queries from Cancelled Stream Error HOT 5
- The package "http2" wasn't found on the file system but is built into node HOT 11
- Typechecking functions such as `IsString` should also null as a parameter (typescript typing issue) HOT 2
- 4.7.0 to 4.7.1 causes InvalidValue error when importing code HOT 5
- TypeError: faunadb.Client is not a constructor HOT 10
- Is it safe to expose the key in the browser? HOT 3
- Explictly set 'Content-Type': 'application/json' HOT 1
- OPTIONS xhr request before POST HOT 1
- PageHelper.nextPage() fails to handle the final page HOT 2
- PageHelper.nextPage() throws an error if `size` parameter is passed to `Client.paginate()` HOT 1
- what is the status of the ESM driver? HOT 2
- require('util') fails in some ESM configurations HOT 1
- "TypeError: Incorrect type for the 'signal' field on 'RequestInitializerDict': the provided value is not of type 'AbortSignal'." HOT 1
- Allow login, disable creating account HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faunadb-js.