Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

node wrapper for dart:io #436

Closed
jmesserly opened this issue Jan 29, 2016 · 6 comments
Closed

node wrapper for dart:io #436

jmesserly opened this issue Jan 29, 2016 · 6 comments

Comments

@jmesserly
Copy link
Contributor

We can now compile & run on nodejs. But we don't have a dart:io impl.

@Kleak
Copy link

Kleak commented Apr 22, 2016

Hey maybe i can help on this task.

I'm wrapping nodejs with the js package : nodejs.dart
And a beginning of electron : electron.dart

The only problem i have is that i am not able to launch generated js file in node with this CL
dartdevc --v8-binary node -o build --modules node example/test_ddc_example.dart

it throw an error:

Error: Cannot find module 'dart/_runtime'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (/home/kleak/Work/test_ddc/build/test_ddc_example.js:2:12)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)

@vsmenon
Copy link
Contributor

vsmenon commented Apr 22, 2016

Have you tried the preliminary node usage instructions near the end of #485 ?

@Kleak
Copy link

Kleak commented Apr 22, 2016

Nop, thanks, i will retry with this :)

@jmesserly
Copy link
Contributor Author

yeah you may want to sync to "master" as well. The newer compiler won't generate "dart/_runtime" anymore, it should be trying to require("dart_sdk")

@Kleak
Copy link

Kleak commented May 5, 2016

ok is there a starting point where i can look how to wrap an API ? Or is it the same as with the js package ?

@jmesserly
Copy link
Contributor Author

This issue was moved to dart-lang/sdk#27349

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

No branches or pull requests

3 participants