Open
Description
Trying to use micropython.js following the npmjs readmem somehow an internal node_modules/micropython/index.js:113:49
could not be imported.
// index.js
import mp_js from 'micropython';
/*
(async () => {
await mp_js;
mp_js.init(64 * 1024);
mp_js.do_str("print('hello world')\n");
})();
*/
🚨 /Users/alanjds/src/git/parcel-plugin-micropython/node_modules/micropython/index.js:113:49: Unexpected token, expected ";" (113:49)
111 | return await methods.do_str(pyjs);
112 | }
> 113 | methods.register_module = async (module, code) {
| ^
114 | if (!pyjs_initiated) return pyjs += '\n' + await methods.do_str(code, module, false);
115 | return await methods.do_str(code, module, true);
116 | }
May be possible to this package to have some specification issue on packages.json
?
Looks like some babel translation is not being applied? But I could not find it by myself. Am I looking at the wrong place/path?
Context:
$ node --version
v9.11.2
$ cat package.json
{
"name": "helloworld",
"version": "1.0.0",
"description": "An absolute bare-bones web app.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "parcel serve web/index.html"
},
"author": "",
"license": "ISC",
"dependencies": {
"eslint": "^6.0.1",
"parcel-plugin-micropython": "file:../.."
},
"devDependencies": {
"@babel/core": "^7.2.2"
}
}
Metadata
Metadata
Assignees
Labels
No labels