You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
When I tried to run example code of How to run Prepack I got an error like below.
$ echo"function hello() { return 'hello'; } function world() { return 'world'; } s = hello() + ' ' + world();">/tmp/sample.js
$ cat /tmp/sample.js | yarn prepack
yarn prepack v0.24.5
$ node lib/prepack-cli.js
No sourcemap found at .
/Users/SB/personal/prepack/lib/prepack-cli.js:200
console.log(serialized.code);
^
TypeError: Cannot read property 'code' of null
at processSerializedCode (/Users/SB/personal/prepack/lib/prepack-cli.js:200:29)
at ReadFileContext.callback (/Users/SB/personal/prepack/lib/prepack-node.js:69:7)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:366:13)
error Command failed with exit code 1.
I've figured out that this LOC returns null as first argument which follows a convention of error first callback.
Is it intentional implementation or just a bug? Can I tackle it and make PR?
The text was updated successfully, but these errors were encountered:
Summary:
Since example code of [How to run Prepack](https://github.com/facebook/prepack#how-to-run-prepack) doesn't work(#781 )
I fixed `processSerializedCode` function to handle error as 1st argument
which follows 'error first callback' convention.
And to verify the changes I've added test code for the case of `StdIn`
Closes#784
Differential Revision: D5375275
Pulled By: NTillmann
fbshipit-source-id: ea85d0f30db4305aa7fcb5b69bf28f5998a84962
When I tried to run example code of How to run Prepack I got an error like below.
I've figured out that this LOC returns null as first argument which follows a convention of
error first callback
.Is it intentional implementation or just a bug? Can I tackle it and make PR?
The text was updated successfully, but these errors were encountered: