angular-cli: iOS 9.3 simulator throws "ReferenceError: Can't find variable: SockJS" error for "ng serve -o"
Bug Report or Feature Request (mark with an x
)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
Angular CLI: 1.5.0
Node: 8.5.0
OS: darwin x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router
@angular/cli: 1.5.0
@angular/tsc-wrapped: error
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.1
typescript: 2.4.2
webpack: 3.8.1
Repro steps.
- ng serve -o
- Fire up a simulator device with iOS 9.3
- Access your app at localhost:xxxx
The log given by the failure.
ReferenceError: Can't find variable: SockJS
Desired functionality.
Local webserver should work in iOS 9.3
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 12
- Comments: 15 (1 by maintainers)
I’ve found that disabling sourcemaps is a workaround:
same for Safari 10.1.2
same here for safari 10.1.1
Should this not be fixed soon? It is preventing us from updating cli, because we want our projects to work on Safari…
Same on Safari 10.1
when its going to be fixed ?
Same problem with ng serve on Safari
Built applications (
ng build
) will work on safari. This issue is caused bywebpack-dev-server
the server used withng serve
to perform live-reloading. It requires basic ES2015 browser support. Also, due to a bug that was fixed in Safari 11, enabling (the default) source map support causes the issue as well on version less than 11. Unfortunately without changes towebpack-dev-server
, this will be an ongoing limitation.Same issue with cli 1.5 here, safari, ios…(not sure the version)
Same on Safari 10.0.2 on Sierra 10.12.2
This is an issue with iOS 10.3.3