1
Scott and Thompson 2 weeks ago

Get error when running lite-server on Truffle-UI lesson?

Error below.
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-sH05J5v5PYdJ68g2afiEB9/MtY6XcdZRoVbI7nRYccQ=’), 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.

  1. 1
    Jack Wu
    Jack Wu 1 week ago
    Hi Scott, did you try running truffle compile before running lite-server? Also make sure the bs-config.json file is in the election/ folder (not the src/ folder) and you run lite-server from the election/ folder as well.