Error combining with 6to5ify
See original GitHub issueI’m trying to do a brfs transform after 6to5ify, but get the following error.
browserify()
.require("main", { entry: true })
.transform(6to5ify)
.transform(brfs)
.bundle()
.pipe(fs.createWriteStream(path.join('app.js')));
events.js:72
throw er; // Unhandled 'error' event
^
Error: tried to statically call { readFile: [Function: readFile], readFileSync: [Function: readFileSync], readdir: [Function: readdir], readdirSync: [Function: readdirSync] } as a function while parsing file: /Users/akula/foo/main.js while parsing file: /Users/akula/foo/main.js
at error (/Users/akula/foo/node_modules/brfs/node_modules/static-module/index.js:71:49)
at traverse (/Users/akula/foo/node_modules/brfs/node_modules/static-module/index.js:247:24)
at walk (/Users/akula/foo/node_modules/brfs/node_modules/static-module/index.js:216:13)
at walk (/Users/akula/foo/node_modules/brfs/node_modules/static-module/node_modules/falafel/index.js:60:9)
at /Users/akula/foo/node_modules/brfs/node_modules/static-module/node_modules/falafel/index.js:51:25
at Array.forEach (native)
at forEach (/Users/akula/foo/node_modules/brfs/node_modules/static-module/node_modules/falafel/index.js:8:31)
at /Users/akula/foo/node_modules/brfs/node_modules/static-module/node_modules/falafel/index.js:49:17
at Array.forEach (native)
at forEach (/Users/akula/foo/node_modules/brfs/node_modules/static-module/node_modules/falafel/index.js:8:31)
btw, there’s a double “while parsing file” in the message.
My main.js looks like this.
import fs from 'fs';
var foo = fs.readFileSync(__dirname + '/foo.html');
console.log(foo.toString());
If I change the import to a require and don’t do 6to5ify it works fine, but together it gives the error.
Issue Analytics
- State:
- Created 9 years ago
- Comments:12
Top Results From Across the Web
Error handling in Combine explained with code examples
Error handling in Swift Combine explained by covering operators like mapError, catch, replaceError, assertOnFailure, and how to map to the ...
Read more >How to import widgets from NPM package - Open Q&A
When we try to npm install and import the modules like in the examples we get an error in our gulp setup. We...
Read more >Untitled
Sbl-eai-04451 error in siebel, Folkem kft debrecen, Rere atu rere mai, ... 963 google play error, Greek national opera atene, Owsinski mixing pdf, ......
Read more >Error with combining lists - data
Error with combining lists ... I'm attempting to combine lists of the form. In: PressureChange = Data[[All,{3}]]//ToExpression; Out: {{0.19} ...
Read more >Untitled
Momc error, Is there a notebook 2 movie, Diocesis tacna y moquegua 2014, ... Mouserate windows 8.1, Over ripe bananas gas, Browserify 6to5ify,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m guessing this is down to how Babel (was: 6to5) transpiles ES6 imports. This:
Becomes this:
If you want to go this route, resorting to a regular
require
call works fine:But it works perfectly fine when used like
I don’t have to disable 6to5.