Scully: Error starting scully serve on SSL (0.0.82)

Created on 20 Mar 2020  路  5Comments  路  Source: scullyio/scully

馃悶 Bug report

Description

Since the latest update to @scullyio/scully 0.0.82 scully serve throws an error trying to run the server on SSL.

Could not start Scully serve TypeError: http_proxy_middleware_1.createProxyMiddleware is not a function

馃敩 Minimal Reproduction

Command:
scully "serve" "--host=local.1800contactstest.com" "--proxy-config=src/proxy.conf.json" "--ssl=true" "--ssl-cert=config/cert/1800contactstest.crt" "--ssl-key=config/cert/1800contactstest.key"

馃捇Your Environment

Angular Version:


Angular CLI: 8.0.6
Node: 12.16.1
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, upgrade

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.6
@angular-devkit/build-angular     0.800.6
@angular-devkit/build-optimizer   0.800.6
@angular-devkit/build-webpack     0.800.6
@angular-devkit/core              8.0.0
@angular-devkit/schematics        8.0.0
@angular/cli                      8.0.6
@ngtools/webpack                  8.0.6
@schematics/angular               8.0.0
@schematics/update                0.800.6
rxjs                              6.4.0
typescript                        3.4.5
webpack                           4.30.0

Scully Version:


"@scullyio/init": "0.0.23",
"@scullyio/ng-lib-v8": "0.0.21",
"@scullyio/scully": "0.0.82",

馃敟 Exception or Error


> scully "serve" "--host=local.1800contactstest.com" "--proxy-config=src/proxy.conf.json" "--ssl=true" "--ssl-cert=config/cert/1800contactstest.crt" "--ssl-key=config/cert/1800contactstest.key"

starting static server
traversing app for routes
Could not start Scully serve TypeError: http_proxy_middleware_1.createProxyMiddleware is not a function
bug

Most helpful comment

@SanderElias @jorgeucano,
I updated locally my http-proxy-middleware to v1.0.3 and the issue was fixed.

Frosty asked me to let you guys know this means we need to add this dependency to the V8 branch.

All 5 comments

@SanderElias we need to get this fixed ASAP.

@jorgeucano can you reproduce this? Since you're on windoww... you need to test this.

@aaronfrost Yes is an error in the support for typescript... Im creating a PR and after this i will fix this issue

createProxyMiddleware was added in version 1.x.x according to https://github.com/chimurai/http-proxy-middleware

We get the version of http-proxy-middleware as a dependency of Angular Devkit webpack Dev Server and webpack dev server. The version we have is 0.19.1 which doesn't have that method:
https://github.com/chimurai/http-proxy-middleware/tree/v0.19.1

We have Angular v8.0.6. We attempted to update to the latest of Angular-cli (8.3.25) but it broke our hybrid build. We have some cachegroups that don't get added by Angular anymore because of https://github.com/angular/angular-cli/issues/17146.

Perhaps there is a version we can upgrade to that includes http-proxy-middleware 1.x.x or maybe it's time to fix the cachegroup issue in a post-build task.

@SanderElias @jorgeucano,
I updated locally my http-proxy-middleware to v1.0.3 and the issue was fixed.

Frosty asked me to let you guys know this means we need to add this dependency to the V8 branch.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jorgeucano picture jorgeucano  路  4Comments

dbubenheim picture dbubenheim  路  4Comments

montella1507 picture montella1507  路  5Comments

pierresigwalt picture pierresigwalt  路  4Comments

ghost picture ghost  路  4Comments