Angular-cli: Not able to load the shims

Created on 18 May 2017  路  4Comments  路  Source: angular/angular-cli

Bug Report or Feature Request (mark with an x)

- [ x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.0.3
node: 6.9.4
os: win32 x64 (Windows 7)
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.0.3
@angular/compiler-cli: 4.1.3

Repro steps.

  • Create a new project using the latest Cli
  • Add the script link to shim.min.js described in Angular Documentation - Browser Support
  • ng serve the application and see e.g. in Chrome dev tools whether the shim was loaded

The log given by the failure.

:4200/node_modules/core-js/client/shim.min.js Failed to load resource: the server responded with a status of 404 (Not Found)

Desired functionality.

The shim is available and will load

Mention any other details that might be useful.

It has been working on some of the older projects but all my newer projects seem to have this problem.

RFC / discussion / question

Most helpful comment

Glad that worked for you... the docs are moving to be more CLI-based. So that will be covered there.

All 4 comments

The shims are available in the polyfills file in the project.

You can see which one's would need to be used here

Please remove the script tag from index.html and uncomment what you need in the polyfills file.

Thank you @Brocco that worked like a charm.
Maybe it would be a good idea to add this information to the Browser Support section in the documention so that others won't have similar issues.

Glad that worked for you... the docs are moving to be more CLI-based. So that will be covered there.

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._

Was this page helpful?
0 / 5 - 0 ratings