sveltejs / rollup-plugin-svelte

Compile Svelte components with Rollup
MIT License
503 stars 79 forks source link

V8/C++ error with rollup-plugin-svelte@2.x #13

Closed TehShrike closed 7 years ago

TehShrike commented 7 years ago

Sorry for the incomplete reproduction - here's what I know so far:

When I build https://github.com/tehshrike/revelation-timeline with rollup-plugin-svelte@2.x, on node 7 or 8 (I haven't tested on 6 or older), node crashes with this stack trace:

/usr/local/bin/node[4247]: ../src/node_file.cc:527:void node::InternalModuleReadFile(const FunctionCallbackInfo<v8::Value> &): Assertion `(numchars) >= (0)' failed.
 1: node::Abort() [/usr/local/bin/node]
 2: node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, char const*, int, v8::Local<v8::Value>*, double, double) [/usr/local/bin/node]
 3: node::InternalModuleReadFile(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
 4: 0x2ae4aa8e9a65
sh: line 1:  4242 Abort trap: 6

I suspect it is related to this node.js issue, and after this pull request is merged, there would be a much more useful stack trace.

Rolling back to the latest version of rollup-plugin-svelte@1.x eliminates the crash.

Rich-Harris commented 7 years ago

Amazingly, if you click the link to rollup-plugin-svelte@1.x, your computer will try and send the plugin an email.

Anyway: I don't know if this fixes anything but it's at least possible — I've released 2.0.3 which bails as soon as it sees a module ID that begins with \0 (since that indicates that a module was generated by a plugin and therefore isn't relevant). Will leave this open in case it's not fixed.

nikolaswise commented 7 years ago

I had this trub myself; updating to the 2.0.3 patch seems to have cleared it up.

TehShrike commented 7 years ago

The revelation-timeline project is in a bit of upheaval at the moment, but I did go back and try building with 2.0.3 and didn't see any errors.

TehShrike commented 7 years ago

everything is cool and life is good 👍