[Bug]: new project ,show this : Unable to load manifest, do you need to generate sources?
Describe the bug
node -v 20.15.0
npm -v 10.7.0
Steps to Reproduce
- new evidence project in vscode
- start evidence
- showing this bug
Logs
No response
System Info
No response
Severity
annoyance
Additional Information, or Workarounds
No response
macbook air with M1
Hi @taste1989 your image did not upload.
if you run npm run sources and then retry, does it work?
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<NodeDuckDB>::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]
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.
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<NodeDuckDB>::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
----- 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
okay, the issue appears to be with duckdb. report the bug on their repository duckdb/duckdb-node
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