Comments (7)
For what it is worth I have found a workaround for it, turns out Netlify Dev/Netlify Lambda accepts a config param and you can pass it a custom webpack.config.js
file.
More info here netlify/netlify-faunadb-example#8
from faunadb-js.
Hi @kevupton. Unfortunately, I'm not able to simulate this error. It seems to be a known issue with formidable, a sub-dependency of the JS driver. Would you mind trying their recommended workaround and reporting back, please?
from faunadb-js.
Hey @erickpintor somethign super weird is happening. I am going to list out all the details as I have no idea what is going on.
So I added the fix they recommended: new webpack.DefinePlugin({ "global.GENTLY": false })
and this worked when I was only using webpack. If I use webpack and serverless together it seems to break as above.
However webpack on its on requires me to remove the ''
from the
resolve: {
extensions: ['.ts', '.js', '.tsx', '.jsx', '']
},
otherwise it will error out, saying invalid configuration object webpack resolve extension empty string
However when I remove that and run webpack with serverless. I receive the following error. Entry module not found: Error: Cannot resolve 'file' or 'directory'
So I add the ''
back into the extensions and then that fixes the above error message, however will then break on the original error messages.
So the conclusion is it seems to only break when I combine serverless and webpack. Which is unusal, as the webpack versions are the same, when I run it without serverless and with serverless.
My webpack configuration object is as follows:
module.exports = {
entry: './handler.ts',
target: 'node',
module: {
loaders: [
{ test: /\.ts(x?)$/, loader: 'ts-loader' },
{ test: /\.json$/, loader: 'json-loader' },
]
},
resolve: {
extensions: ['.ts', '.js', '.tsx', '.jsx']
},
output: {
libraryTarget: 'commonjs',
path: path.join(__dirname, '.webpack'),
filename: 'handler.js'
},
plugins: [
new webpack.IgnorePlugin(/vertx/),
new webpack.DefinePlugin({ "global.GENTLY": false })
]
};
If you can point me in a direction I would be very much appreciated. This has me stumped for a few days now.
from faunadb-js.
So I have solved the problem, and it seemed to be caused by an outdated version of the serverless-webpack plugin. RIP
Just had to update that plugin and then it worked
from faunadb-js.
I'm glad you've found the solution. Thanks for replying back to us.
I'm going to close this for now but, feel free to open new issues if need any help.
from faunadb-js.
I am facing this issue and since I am using Netlify Dev, I don't think there is a way I can modify my webpack.config.json
.
Is there any other way I can get over this obstacle, I am really eager to use FaunaDB but I am unable to to do anything so far.
from faunadb-js.
@iamtekeste We will talk about this in our standup tomorrow and see what we can work out about it?
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.