Skip to content
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

Previously working project w/o changes now fails to build due to CORS errors #768

Closed
Splaktar opened this issue Nov 3, 2018 · 7 comments

Comments

@Splaktar
Copy link

Splaktar commented Nov 3, 2018

https://stackblitz.com/edit/angularjs-material-ngupgradelite?file=package.json

This project used to work, but has stopped working in the last couple of months. The CORS issues appear to be on the Stackblitz side.

Duplicate definition of module 'vs/basic-languages/typescript/typescript'
s.defineModule @ loader.js:1176
o @ loader.js:1613
(anonymous) @ typescript.js:7
Access to fetch at 'https://t.staticblitz.com/v6/@angular/upgrade@7.0.2' from origin 'https://stackblitz.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
angularjs-material-ngupgradelite?file=package.json:1 Access to fetch at 'https://t.staticblitz.com/v6/@angular/upgrade@7.0.2' from origin 'https://stackblitz.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Access to fetch at 'https://t.staticblitz.com/v6/@types/angular@1.6.51' from origin 'https://stackblitz.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
angularjs-material-ngupgradelite?file=package.json:1 Access to fetch at 'https://t.staticblitz.com/v6/@types/angular@1.6.51' from origin 'https://stackblitz.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Access to fetch at 'https://data.jsdelivr.com/v1/package/npm/@types/angular@1.6.51' from origin 'https://stackblitz.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
angularjs-material-ngupgradelite?file=package.json:1 Access to fetch at 'https://data.jsdelivr.com/v1/package/npm/@types/angular@1.6.51' from origin 'https://stackblitz.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Access to fetch at 'https://data.jsdelivr.com/v1/package/npm/@angular/upgrade@7.0.2' from origin 'https://stackblitz.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
angularjs-material-ngupgradelite?file=package.json:1 Access to fetch at 'https://data.jsdelivr.com/v1/package/npm/@angular/upgrade@7.0.2' from origin 'https://stackblitz.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
engineworker.js:1 Uncaught (in promise) TypeError: Failed to fetch
Promise.then (async)
e.default @ engineworker-28a42a8f47380fbf2140a.js:1
(anonymous) @ engineworker-28a42a8f47380fbf2140a.js:1
dispatch @ engineworker-28a42a8f47380fbf2140a.js:1
(anonymous) @ engineworker-28a42a8f47380fbf2140a.js:1
t.onmessage @ engineworker-28a42a8f47380fbf2140a.js:1

Browser: Chrome Version 70.0.3538.77 (Official Build) (64-bit)

@Splaktar
Copy link
Author

Splaktar commented Nov 3, 2018

Firefox 63 fails the same way:

Duplicate definition of module 'vs/basic-languages/typescript/typescript' loader.js:1176
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://t.staticblitz.com/v6/@types/angular@1.6.51. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).[Learn More]
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://t.staticblitz.com/v6/@angular/upgrade@7.0.2. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).[Learn More]

@bob-lee
Copy link

bob-lee commented Nov 3, 2018

Some of my demos are broken the same way, seems having difficulty in getting dependencies from npmjs

@EricSimons
Copy link
Member

EricSimons commented Nov 3, 2018 via email

@EricSimons
Copy link
Member

EricSimons commented Nov 3, 2018 via email

@bob-lee
Copy link

bob-lee commented Nov 3, 2018

All demos are back, thanks

@Splaktar
Copy link
Author

Splaktar commented Nov 4, 2018

Thank you, it's working now!

@adamduren
Copy link

This is happening for me on my blitz for the package @angular/pwa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants