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

Refused to execute inline script because it violates the following Content Security Policy directive: #660

Open
shaponpal6 opened this issue Sep 25, 2020 · 0 comments

Comments

@shaponpal6
Copy link

shaponpal6 commented Sep 25, 2020

I am facing this error suddenly. My project is crushed in dev mode. Please

Refused to execute inline script because it violates the following Content Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-d8xVpEfOlXT388lPL445U0wcaE4cweRSVh5BQpm9scE='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.

Found This error on cli:

 in ./src/myStyle.module.css (./node_modules/css-loader/dist/cjs.js??ref--10-1!./node_modules/postcss-loader/dist/cjs.js??ref--10-2!./node_modules/sass-loader/dist/cjs.js??ref--10-3!./src/myStyle.module.css)
Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
ValidationError: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'plugins'. These properties are valid:
   object { postcssOptions?, execute?, sourceMap? }
    at validate (E:\XAMPP\htdocs\wpcli\wp-content\plugins\wpcwv\cwv-widget\node_modules\schema-utils\dist\validate.js:98:11)
    at Object.loader (E:\XAMPP\htdocs\wpcli\wp-content\plugins\wpcwv\cwv-widget\node_modules\postcss-loader\dist\index.js:43:28)

No CSS/SCSS/SASS file is loaded.

I have updated all loader and packages. Lots of Google search but nothing happens.

Without CSS or other style application worked as well.

Have you any solve? Please help

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

1 participant