Comments (7)
okay, the issue appears to be with duckdb. report the bug on their repository duckdb/duckdb-node
from evidence.
macbook air with M1
from evidence.
Hi @taste1989 your image did not upload.
if you run npm run sources
and then retry, does it work?
from evidence.
hi @archiewood I tried, but it still doesn't work.
showing this belowใ
Evidence % npm run sources
[email protected] sources
evidence sources
FATAL ERROR: v8::Template::Set Invalid value, must be a primitive or a Template
----- Native stack trace -----
1: 0x104a44b18 node::OnFatalError(char const*, char const*) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
2: 0x104bcfa2c v8::Template::Set(v8::Localv8::Name, v8::Localv8::Data, v8::PropertyAttribute) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
3: 0x1049f6460 napi_define_class [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
4: 0x140009408 Napi::ObjectWrap<node_duckdb::Database>::DefineClass(Napi::Env, char const*, unsigned long, napi_property_descriptor const*, void*) [/Users/yi/Documents/Evidence/node_modules/duckdb/lib/binding/duckdb.node]
5: 0x1400059ac node_duckdb::Database::Init(Napi::Env, Napi::Object) [/Users/yi/Documents/Evidence/node_modules/duckdb/lib/binding/duckdb.node]
6: 0x140003938 NodeDuckDB::NodeDuckDB(Napi::Env, Napi::Object) [/Users/yi/Documents/Evidence/node_modules/duckdb/lib/binding/duckdb.node]
7: 0x1400052e8 Napi::Addon::Init(Napi::Env, Napi::Object) [/Users/yi/Documents/Evidence/node_modules/duckdb/lib/binding/duckdb.node]
8: 0x140004980 napi_register_module_v1 [/Users/yi/Documents/Evidence/node_modules/duckdb/lib/binding/duckdb.node]
9: 0x104a0f030 napi_module_register_by_symbol(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Context, napi_value__* ()(napi_env__, napi_value__), int) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
10: 0x104a1454c std::__1::__function::__func<node::binding::DLOpen(v8::FunctionCallbackInfov8::Value const&)::$_0, std::__1::allocator<node::binding::DLOpen(v8::FunctionCallbackInfov8::Value const&)::$_0>, bool (node::binding::DLib)>::operator()(node::binding::DLib*&&) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
11: 0x1049e38e4 node::Environment::TryLoadAddon(char const*, int, std::__1::function<bool (node::binding::DLib*)> const&) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
from evidence.
This appears to be a bug with the duckdb installation.
can you confirm you can install and use duckdb in a test node project:
to test a duckdb node project minimally, follow these steps:
-
create a new directory: start fresh to avoid any conflicts.
mkdir test-duckdb cd test-duckdb
-
initialize a new node project: set up a new npm project.
npm init -y
-
install duckdb: add the duckdb node module.
npm install duckdb
-
create a test script: make a simple script to test duckdb functionality.
echo "const duckdb = require('duckdb'); \ const db = new duckdb.Database(':memory:'); \ db.all('SELECT 42 AS answer', (err, res) => { \ if (err) { \ console.error('Error:', err); \ } else { \ console.log('Result:', res); \ } \ });" > test.js
-
run the test script: execute the script to see if duckdb works.
node test.js
if everything is set up correctly, you should see:
Result: [ { answer: 42 } ]
if there's an error, it will help you pinpoint where things might be going wrong in your environment or setup.
from evidence.
hi @archiewood thanks for helping me with this issue. I
tried, still showing error with follow.
node test.js
FATAL ERROR: v8::Template::Set Invalid value, must be a primitive or a Template
----- Native stack trace -----
1: 0x104d88b18 node::OnFatalError(char const*, char const*) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
2: 0x104f13a2c v8::Template::Set(v8::Localv8::Name, v8::Localv8::Data, v8::PropertyAttribute) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
3: 0x104d3a460 napi_define_class [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
4: 0x11a8c9408 Napi::ObjectWrap<node_duckdb::Database>::DefineClass(Napi::Env, char const*, unsigned long, napi_property_descriptor const*, void*) [/Users/yi/Documents/Evidence/test-duckdb/node_modules/duckdb/lib/binding/duckdb.node]
5: 0x11a8c59ac node_duckdb::Database::Init(Napi::Env, Napi::Object) [/Users/yi/Documents/Evidence/test-duckdb/node_modules/duckdb/lib/binding/duckdb.node]
6: 0x11a8c3938 NodeDuckDB::NodeDuckDB(Napi::Env, Napi::Object) [/Users/yi/Documents/Evidence/test-duckdb/node_modules/duckdb/lib/binding/duckdb.node]
7: 0x11a8c52e8 Napi::Addon::Init(Napi::Env, Napi::Object) [/Users/yi/Documents/Evidence/test-duckdb/node_modules/duckdb/lib/binding/duckdb.node]
8: 0x11a8c4980 napi_register_module_v1 [/Users/yi/Documents/Evidence/test-duckdb/node_modules/duckdb/lib/binding/duckdb.node]
9: 0x104d53030 napi_module_register_by_symbol(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Context, napi_value__* ()(napi_env__, napi_value__), int) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
10: 0x104d5854c std::__1::__function::__func<node::binding::DLOpen(v8::FunctionCallbackInfov8::Value const&)::$_0, std::__1::allocator<node::binding::DLOpen(v8::FunctionCallbackInfov8::Value const&)::$_0>, bool (node::binding::DLib)>::operator()(node::binding::DLib*&&) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
11: 0x104d278e4 node::Environment::TryLoadAddon(char const*, int, std::__1::function<bool (node::binding::DLib*)> const&) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
12: 0x104d571c4 node::binding::DLOpen(v8::FunctionCallbackInfov8::Value const&) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
13: 0x104f7e2f0 v8::internal::MaybeHandlev8::internal::Object v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate*, v8::internal::Handlev8::internal::HeapObject, v8::internal::Handlev8::internal::FunctionTemplateInfo, v8::internal::Handlev8::internal::Object, unsigned long*, int) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
14: 0x104f7d9e8 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
15: 0x105804b24 Builtins_CEntry_Return1_ArgvOnStack_BuiltinExit [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
16: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
17: 0x10a8dd484
18: 0x10a8dbf58
19: 0x10a8d4328
20: 0x10a8d237c
21: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
22: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
23: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
24: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
25: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
26: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
27: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
28: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
29: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
30: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
31: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
32: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
33: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
34: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
35: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
36: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
37: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
38: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
39: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
40: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
41: 0x10577c3e4 Builtins_InterpreterEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
42: 0x10577a50c Builtins_JSEntryTrampoline [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
43: 0x10577a1f4 Builtins_JSEntry [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
44: 0x1050522f0 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
45: 0x10505173c v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object, int, v8::internal::Handlev8::internal::Object) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
46: 0x104f2c02c v8::Function::Call(v8::Localv8::Context, v8::Localv8::Value, int, v8::Localv8::Value) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
47: 0x104d69c28 node::builtins::BuiltinLoader::CompileAndCall(v8::Localv8::Context, char const*, node::Realm*) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
48: 0x104df8cf8 node::Realm::ExecuteBootstrapper(char const*) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
49: 0x104d4d69c node::StartExecution(node::Environment*, std::__1::function<v8::MaybeLocalv8::Value (node::StartExecutionCallbackInfo const&)>) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
50: 0x104cb9504 node::LoadEnvironment(node::Environment*, std::__1::function<v8::MaybeLocalv8::Value (node::StartExecutionCallbackInfo const&)>, std::__1::function<void (node::Environment*, v8::Localv8::Value, v8::Localv8::Value)>) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
51: 0x104dc886c node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
52: 0x104dc85dc node::NodeMainInstance::Run() [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
53: 0x104d507f4 node::Start(int, char**) [/Users/yi/.nvm/versions/node/v20.15.0/bin/node]
54: 0x198299430 start [/usr/lib/system/libdyld.dylib]
----- JavaScript stack trace -----
1: Module._extensions..node (node:internal/modules/cjs/loader:1454:18)
2: Module.load (node:internal/modules/cjs/loader:1208:32)
3: Module._load (node:internal/modules/cjs/loader:1024:12)
4: Module.require (node:internal/modules/cjs/loader:1233:19)
5: require (node:internal/modules/helpers:179:18)
6: /Users/yi/Documents/Evidence/test-duckdb/node_modules/duckdb/lib/duckdb-binding.js:4:15
7: Module._compile (node:internal/modules/cjs/loader:1358:14)
8: Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
9: Module.load (node:internal/modules/cjs/loader:1208:32)
10: Module._load (node:internal/modules/cjs/loader:1024:12)
zsh: abort node test.js
from evidence.
Got the same issue earlier. Did this to resolve
- npm uninstall duckdb
- make sure duckdb and duckdb-async folders are gone from node_modules.
- npm install duckdb --verbose --build-from-source
from evidence.
Related Issues (20)
- [Bug]: App Scrolls to Top of Page Instead of Staying Static When Fullscreen View Is Clicked
- Add a way to easily show a `CodeBlock` in addition to a `QueryViewer` when declaring a query
- Chart Drilldowns HOT 3
- [Bug]: MySQL - adding new source query causes page to error out HOT 2
- [Feature]: ButtonGroup defaultValue prop
- [Bug]: DuckDB SUMMARIZE function does not work
- [Bug]: On templated page load multiple errors "search failed" are shown using a DataTable with the option `search=true`
- [Bug]: Dropdown containing `null` will not load HOT 3
- [Feature]: IAM Authentication for GCP databases
- [Bug]: Dimension Grid cannot handle spaces in column names HOT 2
- [Feature]: Support selecting multiple dimensions in dimension grid HOT 1
- Profile.json file not getting created on server start event HOT 1
- [Bug]: DataTable Search is not loading
- Add field to `connection.yaml` to disable source HMR
- [Bug]: DropDown component breaks when one of the value is `null` HOT 1
- Page loads twice
- [Feature]: Add open new tab for link in drilldown charts
- Netlify hosting issues HOT 1
- [Feature]: Add prop to Date Range component to limit selection to single date
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 evidence.