Can't find variable: Symbol
See original GitHub issueHello,
I’m using 6to5ify with Browserify to get modules working properly with the following task:
gulp.task('scripts', function() {
return gulp.src("js/main.js")
.pipe(browserify({
transform: [to5ify]
}))
.pipe(gulp.dest('./dist'));
});
This works just fine, but it throws the error ReferenceError: Can't find variable: Symbol
, caused by this conversion:
for (let myObject of myArray) {
// ...
}
becomes:
for (var _iterator = myArray[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {
var object = _step.value;
// ...
}
Symbol is defined nowhere. Should I just avoid using the for-of
-loop?
Greetings Arne Bahlo
Issue Analytics
- State:
- Created 9 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Can't find variable: Symbol · Issue #15786 - GitHub
"Debug JS Remotely" is very buggy system , I have many issue with it I use Symbol in a js file from 6...
Read more >React Native - Cant find variable: Symbol - Stack Overflow
I am writing an React-Native-Web (RNW) app. The basic design is a core application that takes a library of custom React-Native components as...
Read more >How to Resolve The Cannot Find Symbol Error in Java - Rollbar
When the Java compiler encounters a use of an identifier which it cannot find in the symbol table, it raises the cannot find...
Read more >What can cause the "cannot find symbol" error in Java?
The “cannot find symbol” error occurs mainly when we try to reference a variable that is not declared in the program which we...
Read more >Compiling ECS 6 for Safari - polyfill - Can't find Symbol
It works just fine but in safari everything is broken because of: Error: ReferenceError: Can't find variable: Symbol I search my ways and...
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
This is misleading, IMO; from the POV of the user, all I’m doing is a syntax transformation (
for of
). Yet I end up requiring babel-polyfill anyways.@kittens neither of the links resolve for me. I was able to get a page by swapping “6to5.org” with “babeljs.io” (https://babeljs.io/docs/faq/) but it is very sparse so its unclear what is wrong and what to do about it.