Error "SCRIPT 1028 Expected identifier, string or number" with IE11
See original GitHub issueHello,
first thanks for this library which was especially helpful for merging objects. 😃
The issue I have is with IE11 which does not seem to like the name of some functions like get in get(obj, path, value) and generate the classic error:
SCRIPT 1028 Expected identifier, string or number
Yet I’m using a whole bunch of transpilation tools to be sure the generated code is compatible with older browsers:
browserify --extension=.jsx --transform [babelify --presets=es2015,stage-2,react --plugins=[babel-plugin-transform-es3-member-expression-literals,babel-plugin-transform-es3-property-literals]] --transform [es3ify] GUI/index.jsx --outfile dist/GUI/bundle.js
But as far as I understand the tools consider your code as valid, which it is for most browsers indeed.
Have you ever heard about this issue?
Thanks.
Mickael
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
SCRIPT1028: Expected identifier, string or number
There are 2 common causes for this error. Either having a trailing comma when inappropriate, or using a JavaScript reserved word.
Read more >SOLUTION: SCRIPT1028: Expected identifier, string or number
There are 2 common ways to trigger the SCRIPT1028: Expected identifier, string or number JavaScript error in earlier versions of Internet ...
Read more >Error "SCRIPT 1028 Expected identifier, string or number" ...
[Solved]-Error "SCRIPT 1028 Expected identifier, string or number" with IE11-babel. js. The issue was more subtle: as dot-prop is a dependency stored in...
Read more >SCRIPT1028: Expected identifier, string
**Actual behavior** Vue fails to load cause script error [Error: SCRIPT1028: SCRIPT1028: Expected identifier, string or number].
Read more >Error with Internet Explorer 11 - SCRIPT1028 - Questions
... error at line 144, column 336 in http://localhost:53394/Scripts/handsontable/handsontable.full.js\n\nSCRIPT1028: Expected identifier, string or number.
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 Free
Top 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

Hello, FYI I have finally fixed it by hand by pre-generating a transpiled version of dot-prop.
package.json:And referencing it in place of the original package stored in
node_modules.someModule.js:Hopefully it will help someone else. 😃
I agree this is not a perfect solution, and I would not scale it to dozens of modules. But for my use-case this is a pragmatic workaround that has unblocked IE 11 support. As for Webpack I’ve tried it and unfortunately it comes with its own set of issues and bugs so I will wait for it to be ready for prime-time. I’ll post any better solution, stay tuned… 😃