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

Not able to load the shims

Open ExTheSea opened this issue 9 years ago • 4 comments

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.

ExTheSea avatar May 18 '17 11:05 ExTheSea

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.

Brocco avatar May 18 '17 13:05 Brocco

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.

ExTheSea avatar May 18 '17 14:05 ExTheSea

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

Brocco avatar May 18 '17 17:05 Brocco

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.