Schmavery / reprocessing

ReasonML graphics library inspired by Processing
https://schmavery.github.io/reprocessing/
MIT License
679 stars 24 forks source link

bytecode runtime error on Ubuntu 18.04: "Unknown error while loading plugin" #95

Closed zploskey closed 6 years ago

zploskey commented 6 years ago
$ npm run start

> reprocessing-example@ start /home/zach/src/reprocessing-example
> ./lib/bs/bytecode/indexhot.byte

Rebuilding hotloaded module
Successfully changed functions
Fatal error: exception Failure("Unknown error while loading plugin")

Relevant lines from npm-debug.log:

10 verbose lifecycle reprocessing-example@~start: CWD: /home/zach/src/reprocessing-example
11 silly lifecycle reprocessing-example@~start: Args: [ '-c', './lib/bs/bytecode/indexhot.byte' ]
12 silly lifecycle reprocessing-example@~start: Returned: code: 2  signal: null
13 info lifecycle reprocessing-example@~start: Failed to exec start script
14 verbose stack Error: reprocessing-example@ start: `./lib/bs/bytecode/indexhot.byte`
14 verbose stack Exit status 2
14 verbose stack     at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack     at emitTwo (events.js:126:13)
14 verbose stack     at EventEmitter.emit (events.js:214:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:126:13)
14 verbose stack     at ChildProcess.emit (events.js:214:7)
14 verbose stack     at maybeClose (internal/child_process.js:925:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
15 verbose pkgid reprocessing-example@
16 verbose cwd /home/zach/src/reprocessing-example
17 error Linux 4.15.0-20-generic
18 error argv "/usr/bin/node" "/usr/bin/npm" "run" "start"
19 error node v8.10.0
20 error npm  v3.5.2
21 error code ELIFECYCLE
22 error reprocessing-example@ start: `./lib/bs/bytecode/indexhot.byte`
22 error Exit status 2

Not sure if it's relevant that this is on npm 3. I've just started by using the defaults shipped by Ubuntu.

Schmavery commented 6 years ago

I'd imagine this is the same issue as https://github.com/Schmavery/reprocessing/issues/94 but the hotreload is hiding the error message. You could run ./lib/bs/bytecode/index.byte to doublecheck

zploskey commented 6 years ago

I'm not sure... Running the the file gives:

$ ./lib/bs/bytecode/indexhot.byte 
Rebuilding hotloaded module
Successfully changed functions
Fatal error: exception Failure("Unknown error while loading plugin")
Schmavery commented 6 years ago

I think you ran the hotreloading version again. If you build and run index.byte rather than indexhot.byte, I would expect a different error.

zploskey commented 6 years ago

How do you build index.byte? That's not a file that's generated for me by npm run build.

Schmavery commented 6 years ago

Ah, just add an entry like this to the bsconfig:

{
    "backend": "bytecode",
    "main-module": "Index"
}
Schmavery commented 6 years ago

I'd imagine this is fixed too now

zploskey commented 6 years ago

Yes, it was the same error as #94 just masked by hot-reloading.

Schmavery commented 6 years ago

Some day we'll fix it so that the error is visible...