angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

iOS 9.3 simulator throws "ReferenceError: Can't find variable: SockJS" error for "ng serve -o"

Open remisture opened this issue 9 years ago • 15 comments

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

remisture avatar Nov 08 '17 14:11 remisture

same for Safari 10.1.2

meiordac avatar Nov 08 '17 15:11 meiordac

same here for safari 10.1.1

G-Nantel avatar Nov 09 '17 17:11 G-Nantel

This is an issue with iOS 10.3.3

Tyler-V avatar Nov 10 '17 15:11 Tyler-V

Same on Safari 10.0.2 on Sierra 10.12.2

kayode-anthony avatar Nov 10 '17 20:11 kayode-anthony

Same issue with cli 1.5 here, safari, ios...(not sure the version)

dang1412 avatar Nov 13 '17 04:11 dang1412

Same problem with ng serve on Safari

FilipeQ avatar Nov 13 '17 16:11 FilipeQ

when its going to be fixed ?

lakinmohapatra avatar Nov 14 '17 11:11 lakinmohapatra

Same on Safari 10.1

huhuixin avatar Nov 15 '17 01:11 huhuixin

Should this not be fixed soon? It is preventing us from updating cli, because we want our projects to work on Safari...

Timmaex avatar Nov 15 '17 09:11 Timmaex

I've found that disabling sourcemaps is a workaround:

$ ng serve --aot --no-sourcemap

danielcrisp avatar Nov 15 '17 11:11 danielcrisp

Built applications (ng build) will work on safari. This issue is caused by webpack-dev-server the server used with ng 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 to webpack-dev-server, this will be an ongoing limitation.

clydin avatar Jan 05 '18 21:01 clydin

This bug blocks developing Angular-5 mobile apps on macbook where Safari developer tool is a big plus

RichardYL avatar Feb 11 '18 13:02 RichardYL

Any update on this?

jenhogan avatar Jun 20 '18 14:06 jenhogan

blocker issue for mac web developers. any progress?

ilgazk avatar Aug 05 '18 01:08 ilgazk

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.