Skip to content
Discussion options

You must be logged in to vote

Hi @jannisbosch,
if you take a closer look at the error message, it says

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

...

The problem here is that knex.js is meant to be run on the server using Node.js, while the code you are writing in experiment.js is bundled by webpack and executed by the client's browser. You'll need to keep the frontend and backend code separate (not only for security reasons)... In other words, any simple express + knex.js app would do for your backend. Whether that's a better solution than the PHP script is another question; a…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jannisbosch
Comment options

@bjoluc
Comment options

Answer selected by jannisbosch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants