Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Error: Cannot find module '../build/Release/canvas.node' #1

Open
drewbuttons opened this issue May 25, 2020 · 2 comments
Open

Error: Cannot find module '../build/Release/canvas.node' #1

drewbuttons opened this issue May 25, 2020 · 2 comments

Comments

@drewbuttons
Copy link

drewbuttons commented May 25, 2020

Get this error when running node app.js on MacOS Catalina 10.15.4:

Error: Cannot find module '../build/Release/canvas.node'
Require stack:
- /Users/drewstock/Desktop/teachablemachine-node-example-master/node_modules/canvas/lib/bindings.js
- /Users/drewstock/Desktop/teachablemachine-node-example-master/node_modules/canvas/lib/canvas.js
- /Users/drewstock/Desktop/teachablemachine-node-example-master/node_modules/canvas/index.js
- /Users/drewstock/Desktop/teachablemachine-node-example-master/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1029:15)
    at Function.Module._load (internal/modules/cjs/loader.js:898:27)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/Users/drewstock/Desktop/teachablemachine-node-example-master/node_modules/canvas/lib/bindings.js:3:18)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/drewstock/Desktop/teachablemachine-node-example-master/node_modules/canvas/lib/bindings.js',
    '/Users/drewstock/Desktop/teachablemachine-node-example-master/node_modules/canvas/lib/canvas.js',
    '/Users/drewstock/Desktop/teachablemachine-node-example-master/node_modules/canvas/index.js',
    '/Users/drewstock/Desktop/teachablemachine-node-example-master/app.js'
  ]
}

I also got a flag saying I was going to need to manually install tf dependencies during npm install:

npm WARN @teachablemachine/[email protected] requires a peer of @tensorflow/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN [email protected] license should be a valid SPDX license expression

Tried installing @tensorflow/[email protected] but that didn't seem to do anything.

Any ideas?

@drewbuttons
Copy link
Author

Got it running after playing w/ tf versions. Not able to successfully complete POST query, though.

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
 1: 0x100bc99f3 node::Abort() (.cold.1) [/usr/local/bin/node]
 2: 0x100081835 node::FatalError(char const*, char const*) [/usr/local/bin/node]
 3: 0x10008199e node::OnFatalError(char const*, char const*) [/usr/local/bin/node]
 4: 0x10018500c v8::Utils::ReportApiFailure(char const*, char const*) [/usr/local/bin/node]
 5: 0x10462bc00 Image::SetSource(Nan::FunctionCallbackInfo<v8::Value> const&) [/Users/drewstock/Desktop/teachablemachine-node-example-master/node_modules/canvas/build/Release/canvas.node]
 6: 0x104601ced Nan::imp::FunctionCallbackWrapper(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/drewstock/Desktop/teachablemachine-node-example-master/node_modules/canvas/build/Release/canvas.node]
 7: 0x1001d1972 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/usr/local/bin/node]
 8: 0x1001d0ffc v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
 9: 0x1001d0820 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
10: 0x100754399 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/usr/local/bin/node]
zsh: abort      node app.js

@sitexw
Copy link

sitexw commented Jun 16, 2020

I have exactly the same problem.
I tried with the version v12.13.0 and v12.18.0 (Windows 10), with and without -gpu flag.
Nothing to do, I have this error message:

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
 1: 00007FF632E0470F napi_wrap+113583
 2: 00007FF632DAF7D6 v8::base::CPU::has_sse+66646
 3: 00007FF632DB05D6 v8::base::CPU::has_sse+70230
 4: 00007FF6335CD635 v8::V8::ToLocalEmpty+53
 5: 00007FFBA6D9536E Canvas::stride+255926
 6: 00007FFBA6D664F7 Canvas::stride+63807
 7: 00007FF633577F80 v8::internal::Builtins::builtin_handle+323456
 8: 00007FF6335774C7 v8::internal::Builtins::builtin_handle+320711
 9: 00007FF633577808 v8::internal::Builtins::builtin_handle+321544
10: 00007FF63357760E v8::internal::Builtins::builtin_handle+321038
11: 00007FF633A178DD v8::internal::SetupIsolateDelegate::SetupHeap+546893
12: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
13: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
14: 00007FF633999CC1 v8::internal::SetupIsolateDelegate::SetupHeap+31793
15: 00007FF6339998AC v8::internal::SetupIsolateDelegate::SetupHeap+30748
16: 00007FF6334D1FC3 v8::internal::Execution::CallWasm+1395
17: 00007FF6334D1946 v8::internal::Execution::Call+182
18: 00007FF6332F0BDF v8::internal::Object::SetProperty+2495
19: 00007FF6332F0730 v8::internal::Object::SetProperty+1296
20: 00007FF6332F0158 v8::internal::Object::SetProperty+72
21: 00007FF63341B109 v8::internal::StubCache::Set+61625
22: 00007FF63341490F v8::internal::StubCache::Set+35007
23: 00007FF633A177DD v8::internal::SetupIsolateDelegate::SetupHeap+546637
24: 00007FF633A73B3E v8::internal::SetupIsolateDelegate::SetupHeap+924334
25: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
26: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
27: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
28: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
29: 00007FF633995ABC v8::internal::SetupIsolateDelegate::SetupHeap+14892
30: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
31: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
32: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
33: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
34: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
35: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
36: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
37: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
38: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
39: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
40: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
41: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
42: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
43: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
44: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
45: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
46: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
47: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
48: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
49: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
50: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
51: 00007FF633995ABC v8::internal::SetupIsolateDelegate::SetupHeap+14892
52: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
53: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
54: 00007FF633995ABC v8::internal::SetupIsolateDelegate::SetupHeap+14892
55: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
56: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
57: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
58: 00007FF633995ABC v8::internal::SetupIsolateDelegate::SetupHeap+14892
59: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
60: 00007FF633995ABC v8::internal::SetupIsolateDelegate::SetupHeap+14892
61: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
62: 00007FF63399C78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
63: 00007FF633999CC1 v8::internal::SetupIsolateDelegate::SetupHeap+31793
64: 00007FF6339998AC v8::internal::SetupIsolateDelegate::SetupHeap+30748
65: 00007FF6334D1FC3 v8::internal::Execution::CallWasm+1395
66: 00007FF6334D1946 v8::internal::Execution::Call+182
67: 00007FF6335A29CD v8::Function::Call+605
68: 00007FF632D96417 v8::internal::OrderedHashTable<v8::internal::OrderedHashSet,1>::NumberOfBucketsOffset+42359
69: 00007FF632D92C92 v8::internal::OrderedHashTable<v8::internal::OrderedHashSet,1>::NumberOfBucketsOffset+28146
70: 00007FF6336A5AC4 v8::base::CPU::has_sse42+464964
71: 00007FF6336A70A7 v8::base::CPU::has_sse42+470567
72: 00007FF632D94DC5 v8::internal::OrderedHashTable<v8::internal::OrderedHashSet,1>::NumberOfBucketsOffset+36645
73: 00007FF632D95BBF v8::internal::OrderedHashTable<v8::internal::OrderedHashSet,1>::NumberOfBucketsOffset+40223
74: 00007FF632CDAAE5 RSA_meth_get_flags+1125
75: 00007FF632E3E7CB uv_tty_set_vterm_state+7531
76: 00007FF632E53C6C uv_loop_init+844
77: 00007FF632E53FA4 uv_run+244
78: 00007FF632D663A1 v8::internal::AsmJsScanner::GetIdentifierString+31777
79: 00007FF632DD90E3 node::Start+275
80: 00007FF632C46A9C RC4_options+340380
81: 00007FF633ACF8C8 v8::internal::SetupIsolateDelegate::SetupHeap+1300536
82: 00007FFC1A1C7BD4 BaseThreadInitThunk+20
83: 00007FFC1B7ACE51 RtlUserThreadStart+33

Tensorflow versions :

        "@tensorflow/tfjs": "^1.3.1",
        "@tensorflow/tfjs-node": "^0.1.21",
        "@tensorflow/tfjs-node-gpu": "^2.0.1",

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants