New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular-cli 8 with create-single-spa fails with error #208
Comments
single-spa-angular@4 does not work with Angular 2-8. Only Angular 9. create-single-spa does not specify a version (because as a generic tool, it assumes the latest tooling versions). I was make some progress after this failure by:
Then I get the following error: ~/dev/ng8test on master ● ●
❯ npm run serve:single-spa:navbar
> navbar@0.0.0 serve:single-spa:navbar /Users/carlosfiloteo/dev/ng8test
> ng s --project navbar --disable-host-check --port 4200 --deploy-url http://localhost:4200/ --live-reload false
WARNING: Running a server with --disable-host-check is a security risk. See https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a for more information.
WARNING: --deploy-url and/or --base-href contain unsupported values for ng serve. Default serve path of '/' used. Use --serve-path to override.
10% building 1/1 modules 0 activeℹ 「wds」: Project is running at http://localhost:4200/webpack-dev-server/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /Users/carlosfiloteo/dev/ng8test/src
chunk {main} main.js, main.js.map (main) 13.9 kB [entry] [rendered]
Date: 2020-06-02T16:04:30.864Z - Hash: 29489b1cefc0d6b5a125 - Time: 2342ms
ERROR in node_modules/single-spa-angular/src/extra-providers.d.ts:2:10 - error TS2305: Module '"../../@angular/common/common"' has no exported member 'ɵBrowserPlatformLocation'.
2 import { ɵBrowserPlatformLocation, LocationChangeEvent } from '@angular/common';
~~~~~~~~~~~~~~~~~~~~~~~~
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
ℹ 「wdm」: Failed to compile. |
Hmm the above appears to be because at some point, something is upgrading single-spa-angular to the latest version rather than keeping the pinned version that is specified with the |
This is due to Angular schematics. When you run For single-spa-angular@3, the schematics add
^ This code appears to be adding single-spa-angular@^3. However, it seems that you're seeing it add single-spa-angular@4?? If so, that is a bug that we should fix. |
I wonder if this was resolved in #231. I'll do some testing in the near future. |
Yeah that PR looks promising for fixing this. |
Closing this since 1) I have not personally seen this come up again since, and 2) we don't seem to have received any other reports of it happening. |
Demonstration
npm i -g @angular/cli@8.3.23
)npx create-single-spa
Expected Behavior
The angular-cli should be able to find and use the single-spa-angular schematic to successfully create a new Angular single-spa application.
Actual Behavior
Observe that after packages are being installed an error is displayed.
Full logs
The text was updated successfully, but these errors were encountered: