Cannot use CDN files due to browser security, and cannot build from source - unable to use module

Created on 19 June 2023, about 1 year ago
Updated 20 June 2023, about 1 year ago

Problem/Motivation

I am trying to install the module, but am unable to use it. The module install proceeds fine, but I run into one of two issues:

1) If I used the CDN, the remote JS file cannot be loaded, and the following error is shown in the browser (FireFox) JS console:

Security Error: Content at https://sandbox.ddev.site/node/1/hax may not load data from https://webcomponents.psu.edu/cdn/build/es6/node_modules/monaco-editor/m....

This happens with all CDNs.

2) If I try to build from source, the Yarn file is outdated and does not install.

As a result, the module is unusable. This is on a clean Drupal 10 installation, Standard install profile, only other module installed is Admin Toolbar. So I think the module is broken on D10.

πŸ› Bug report
Status

Active

Version

9.1

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada Jaypan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Jaypan
  • thank you for the report. I haven't updated the build routine version numbers for some time so clearly have to do that. We are aware of the CORS issue on our CDN build script and need a cloud engineer to review.

    https://github.com/elmsln/haxcms has a working copy of the build (build directory) and build.js file.

    If you could give me the error output of the yarn install I can start making it work for drupal and update all the surrounding integrations

  • πŸ‡¨πŸ‡¦Canada Jaypan

    When I run yarn install, I get this:

    [1/4] Resolving packages...
    warning Lockfile has incorrect entry for "ajv@5.5.2". Ignoring it.
    warning Lockfile has incorrect entry for "fast-deep-equal@^1.0.0". Ignoring it.
    warning Lockfile has incorrect entry for "json-schema-traverse@^0.3.0". Ignoring it.
    info Unable to find a suitable version for "@lrnwebcomponents/grid-plate", please choose one by typing one of the numbers below:
    1) "@lrnwebcomponents/grid-plate@^2.8.0, @lrnwebcomponents/grid-plate@^2.3.3" which resolved to "2.8.0"
    2) "@lrnwebc

    I can pick 1 or 2, and then I get asked a similar question regarding a lot of other libraries. I picked 1 for all of them, and then polymer didn't build. So I restarted and picked 2 for all of them, and polymer still didn't build. Here is an example of running poymer build after selecting 1 for all the library options provided:

    /var/www/html/web/sites/all/libraries/webcomponents$ polymer build
    bash: polymer: command not found

  • while the resolutions are all out of wack (thank you for that) bash: polymer: command not found is a bash level error indicating that polymer isn't installed (probably related to what you are saying). You could try

    ```
    npm install --global polymer-build
    ```

    or

    ```
    npm install --global polymer-cli
    ```

    and see if that helps. Regardless I am actively filing this in our issue queue and looking into it so thank you for the report.

  • πŸ‡¨πŸ‡¦Canada Jaypan

    I copied the /build directory over from HAXcms, but I got the following file not found in the JS console:GET

    https://sandbox.ddev.site/node/1/build/es6/node_modules/@lrnwebcomponent...

Production build 0.69.0 2024