install subtheme not working (unexpected end of json input)

Created on 1 December 2024, about 2 months ago

Installing with drush or nmp generates an error. I use npm 10.9.0 (node 23.2.0) under ubuntu 24.04 LTS.

drush --include="web/themes/contrib/artisan" xxx

[error]  Ups, something failed, please try it manually "cd 
/home/XXX/webapps/XXX_dev/web/themes/custom/xxx" and "npm run production"

npm run production

> xxx@1.0.1 production
> mix --production


āœ– Mix
  Compiled with some errors in 2.64s

38 WARNINGS in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)

ERROR in ./node_modules/@popperjs/core/lib/index.js + 56 modules
Unexpected end of JSON input

webpack compiled with 1 error and 38 warnings
šŸ› Bug report
Status

Active

Version

1.1

Component

Code

Created by

šŸ‡ØšŸ‡­Switzerland snsblvd

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

Comments & Activities

  • Issue created by @snsblvd
  • šŸ‡ØšŸ‡­Switzerland snsblvd
  • šŸ‡ØšŸ‡­Switzerland snsblvd
  • šŸ‡ŖšŸ‡øSpain tunic Madrid

    I'm not able to reproduce this bug. I've tried using node 23.4.0 but it compiles without errors. I'm using DDEV and Aljibe (https://github.com/Metadrop/ddev-aljibe/), but anyway it should work the same with any environment as long as the Artisan release and node are similar.

    Can you try using Aljibe and/or DDEV? To discard problems on your local setup.

  • Thanks for reporting, that error seems related to popper bootstrap 5.3 dependency ("for positioning dropdowns, poppers, and tooltips"), theme dependency is the same as suggested per bootstrap "^2.11.8": https://git.drupalcode.org/project/artisan/-/blob/1.x/artisan_starterkit...

    https://getbootstrap.com/docs/5.3/getting-started/introduction/

    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js" integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js" integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy" crossorigin="anonymous"></script>
    

    Genrated "package-lock.json" expected generation for popperjs:

    "node_modules/@popperjs/core": {
          "version": "2.11.8",
          "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
          "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
          "dev": true,
          "license": "MIT",
          "funding": {
            "type": "opencollective",
            "url": "https://opencollective.com/popperjs"
          }
        },
    

    When that happens you should be able to manage it manually, command is just a helper that will try to simplify process. So if that happens new theme folder should exists either way, but you will have to enable serialization module dependency & default theme manually.

    As tunic said, i'm not able to reproduce this bug either, feel free to change status if you found new details to replicate.

Production build 0.71.5 2024