-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: The "original" argument must be of type Function
when importing 'better-sqlite3'
#8133
Comments
The error comes from this line: The As far as I can tell, |
I am trying to extract texts from books in a sqlite database. I have tried to bundle |
Also, both |
Thank you for your patience. I am really new to web development I am not really sure what bundlers does, but I have found a tutorial that helped me out. Thank you, and all the best (qdV9S7UE99o). |
hai @Kindnessfruit can you please share, on how you solved this error |
@VarmaDev390 I didn't understand the difference between client and server side back then, so I was trying to package better-sqlite3 and executing that on the client side. I solved the problem by avoid using better-sqlite3 on the client side. |
hai @Kindnessfruit. Thank you for replying.
I too moved on from better-sqlite3 to indexedDB for client side storage.
…On Fri, Jul 7, 2023 at 6:45 AM Kindnessfruit ***@***.***> wrote:
hai @Kindnessfruit <https://github.com/Kindnessfruit> can you please
share, on how you solved this error
@VarmaDev390 <https://github.com/VarmaDev390> I didn't understand the
difference between client and server side back then, so I was trying to
package better-sqlite3 and executing that on the client side. I solved the
problem by avoid using better-sqlite3 on the client side.
—
Reply to this email directly, view it on GitHub
<#8133 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A54KGBQWTXQD2OIHFEK7JYLXO5PKZANCNFSM5WZHDLYQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
🐛 bug report
Parcel failed to bundle npm package 'better-sqlite3'.
How to reproduce:
Just create an empty environment with 'better-sqlite3' as dependency and use the import statement on it.
*Parcel autoinstalled polyfill for Node builtin modules "process", "path", "util" before development server is built.
🎛 Configuration (.babelrc, package.json, cli command)
package.json:
🤔 Expected Behavior
(no error)
😯 Current Behavior
Error logged in chromium's console (similar in firefox):
util.js:614 Uncaught TypeError: The "original" argument must be of type Function
--at promisify (util.js:614:11)
--at Object.4Sc93.fs (backup.js:6:18)
--at newRequire (frontpage.81135c31.js:71:24)
--at localRequire (frontpage.81135c31.js:84:35)
--at Object.bRjc7.buffer (database.js:72:29)
--at newRequire (frontpage.81135c31.js:71:24)
--at localRequire (frontpage.81135c31.js:84:35)
--at Object.37mur../database (index.js:2:18)
--at newRequire (frontpage.81135c31.js:71:24)
--at localRequire (frontpage.81135c31.js:84:35)
firefox:
Uncaught TypeError: The "original" argument must be of type Function
--promisify util.js:614
--["4Sc93"]< backup.js:6
--newRequire frontpage.81135c31.js:71
--localRequire frontpage.81135c31.js:84
--bRjc7 database.js:72
--newRequire frontpage.81135c31.js:71
--localRequire frontpage.81135c31.js:84
--["37mur"]< index.js:2
--newRequire frontpage.81135c31.js:71
--localRequire frontpage.81135c31.js:84
--awQL6 fp.js:1
--newRequire frontpage.81135c31.js:71
-- frontpage.81135c31.js:122
-- frontpage.81135c31.js:145
util.js:614:10
--promisify util.js:614
--["4Sc93"]< backup.js:6
--newRequire frontpage.81135c31.js:71
--localRequire frontpage.81135c31.js:84
--bRjc7 database.js:72
--newRequire frontpage.81135c31.js:71
--localRequire frontpage.81135c31.js:84
--["37mur"]< index.js:2
--newRequire frontpage.81135c31.js:71
--localRequire frontpage.81135c31.js:84
--awQL6 fp.js:1
--newRequire frontpage.81135c31.js:71
-- frontpage.81135c31.js:122
-- frontpage.81135c31.js:145
💁 Possible Solution
🔦 Context
'better-sqlite3'.
💻 Code Sample
How to reproduce:
Just create an empty environment with 'better-sqlite3' as dependency and use the import statement on it.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: