Yarn build failed with Radicle 1.4.0 during installation process

On my MacBook Pro M1, during the Radicle installation, on the “yarn build” step, I get the following error:
[ERROR] Could not resolve “@roots/bud-support/cjs-shim”
Despite deleting the node_modules folder and reinstalling the dependencies with yarn, npm and pnpm, I still get an error.
Does anyone have a solution?

  • Yarn 1.22.19
  • NodeJS 20.10.0
  • PHP 8.3.3
  • Valet

All working correctly with Radicle 1.3.2.

When i updating Bud from 6.20.0 to 6.21.0 i obtain the same issue when i execute ‘yarn dev’:
“[ERROR] Could not resolve “@roots/bud-support/cjs-shim””

I have the same issue. Intel processor, latest macos; latest radicle, just downloaded. yarn && yarn dev, same result as OP.

  • Node v20.12.2
  • yarn v1.22.19
  • nushell v0.95.0

My logs:

〰 yarn build

yarn run v1.22.19
warning ../../../../package.json: No license field
$ yarn bud build production
warning ../../../../package.json: No license field
$ /Users/robrecord/Code/Projects/Sites/vm-radicle-hooli-test/node_modules/.bin/bud build production
✘ [ERROR] Could not resolve "@roots/bud-support/cjs-shim"

  The Yarn Plug'n'Play manifest forbids importing "@roots/bud-support" here because it's not listed as a dependency of this package:

    ../../../../.pnp.cjs:38:33:
      38 │           "packageDependencies": [\
         ╵                                  ~~

✘ [ERROR] Could not resolve "@tailwindcss/forms"

    tailwind.config.ts:3:18:
      3 │ import forms from '@tailwindcss/forms';
        ╵                   ~~~~~~~~~~~~~~~~~~~~

  The Yarn Plug'n'Play manifest forbids importing "@tailwindcss/forms" here because it's not listed as a dependency of this package:

    ../../../../.pnp.cjs:38:33:
      38 │           "packageDependencies": [\
         ╵                                  ~~

  You can mark the path "@tailwindcss/forms" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.

[@roots/bud-tailwindcss] › ✖  Error: Build failed with 2 errors:
error: Could not resolve "@roots/bud-support/cjs-shim"
tailwind.config.ts:3:18: ERROR: Could not resolve "@tailwindcss/forms"
    at failureErrorWithLog ([secure]/node_modules/esbuild-wasm/lib/main.js:1640:15)
    at [secure]/node_modules/esbuild-wasm/lib/main.js:1048:25
    at [secure]/node_modules/esbuild-wasm/lib/main.js:993:52
    at buildResponseToResult ([secure]/node_modules/esbuild-wasm/lib/main.js:1046:7)
    at [secure]/node_modules/esbuild-wasm/lib/main.js:1075:16
    at responseCallbacks.<computed> ([secure]/node_modules/esbuild-wasm/lib/main.js:693:9)
    at handleIncomingPacket ([secure]/node_modules/esbuild-wasm/lib/main.js:753:9)
    at Socket.readFromStdout ([secure]/node_modules/esbuild-wasm/lib/main.js:669:7)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:559:12)
✘ [ERROR] Could not resolve "@roots/bud-support/cjs-shim"

  The Yarn Plug'n'Play manifest forbids importing "@roots/bud-support" here because it's not listed as a dependency of this package:

    ../../../../.pnp.cjs:38:33:
      38 │           "packageDependencies": [\
         ╵                                  ~~


BudError

✘ Error parsing bud.config

│ Build failed with 1 error: error: Could not resolve "@roots/bud-support/cjs-shim"

ℹ See file ./bud.config.ts

ℹ Stack trace

│  at ./node_modules/@roots/bud-framework/lib/configuration/index.js:28:31
│  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
│  at async Configuration.run (./node_modules/@roots/bud-framework/lib/configuration/index.js:27:24)
│  at async ./node_modules/@roots/bud-framework/lib/methods/processConfigs.js:14:13
│  at async processConfig (./node_modules/@roots/bud-framework/lib/methods/processConfigs.js:12:9)
│  at async Promise.all (index 0)
│  at async Bud.processConfigs (./node_modules/@roots/bud-framework/lib/methods/processConfigs.js:18:5)
│  at async BuildProductionCommand.makeBud (./node_modules/@roots/bud/lib/cli/commands/index.js:219:16)
│  at async BuildProductionCommand.execute (./node_modules/@roots/bud/lib/cli/commands/build/index.js:76:9)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@rodolphe I fixed this by removing the .pnp.cjs file in my home directory.

From yarnpkg - The Yarn Plug'n'Play manifest forbids importing "XYZ" here because it's not listed as a dependency of this package - Stack Overflow :

look in each of your upstream directories for .pnp.cjs files that may be picked up by Esbuild automatically.

1 Like

@robrecord I fixed too with this solution. :wink:

1 Like