Skip to content

Release 0.32.0 breaks with Error: Cannot find module '@symfony/stimulus-bridge/webpack-helper' #861

@jonathantullett

Description

@jonathantullett

Release 0.32.0 is causing a few problems.

My package.json:

{
    "devDependencies": {
        "@symfony/webpack-encore": "^0.32.0",
        "bootstrap": "^4.5.3",
        "core-js": "^3.0.0",
        "jquery": "^3.5.1",
        "node-sass": "4.14",
        "popper.js": "^1.16.1",
        "regenerator-runtime": "^0.13.2",
        "sass-loader": "^9.0.1",
        "vue": "^2.5",
        "vue-loader": "^15",
        "vue-template-compiler": "^2.6.12",
        "webpack-notifier": "^1.6.0"
    },
    "license": "UNLICENSED",
    "private": true,
    "scripts": {
        "dev-server": "encore dev-server",
        "dev": "encore dev",
        "watch": "encore dev --watch",
        "build": "encore production --progress"
    }
}

What happens:

/app $ yarn add @symfony/webpack-encore --dev
yarn add v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
warning mini-css-extract-plugin@0.4.2: Invalid bin field for "mini-css-extract-plugin".
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > sass-loader@9.0.3" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
warning " > vue-loader@15.9.5" has unmet peer dependency "css-loader@*".
warning " > vue-loader@15.9.5" has unmet peer dependency "webpack@^3.0.0 || ^4.1.0 || ^5.0.0-0".
[4/4] Building fresh packages...
success Saved lockfile.
warning Your current version of Yarn is out of date. The latest version is "1.22.5", while you're on "1.22.4".
info To upgrade, run the following command:
$ apk update && apk add -u yarn
success Saved 2 new dependencies.
info Direct dependencies
└─ @symfony/webpack-encore@0.32.0
info All dependencies
├─ @symfony/webpack-encore@0.32.0
└─ webpack-virtual-modules@0.2.2
Done in 20.09s.
/app $ yarn encore production
yarn run v1.22.4
$ /app/node_modules/.bin/encore production
Running webpack ...

/app/node_modules/webpack-cli/bin/cli.js:93
				throw err;
				^

Error: Cannot find module '@symfony/stimulus-bridge/webpack-helper'
Require stack:
- /app/node_modules/@symfony/webpack-encore/lib/plugins/stimulus-bridge.js
- /app/node_modules/@symfony/webpack-encore/lib/config-generator.js
- /app/node_modules/@symfony/webpack-encore/index.js
- /app/webpack.config.js
- /app/node_modules/webpack-cli/bin/utils/convert-argv.js
- /app/node_modules/webpack-cli/bin/cli.js
- /app/node_modules/webpack/bin/webpack.js
- /app/node_modules/@symfony/webpack-encore/bin/encore.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (/app/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/app/node_modules/@symfony/webpack-encore/lib/plugins/stimulus-bridge.js:13:22)
    at Module._compile (/app/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (/app/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/app/node_modules/@symfony/webpack-encore/lib/config-generator.js:43:24)
    at Module._compile (/app/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (/app/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/app/node_modules/@symfony/webpack-encore/index.js:15:25)
    at Module._compile (/app/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (/app/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/app/webpack.config.js:1:76)
    at Module._compile (/app/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (/app/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at WEBPACK_OPTIONS (/app/node_modules/webpack-cli/bin/utils/convert-argv.js:114:13)
    at requireConfig (/app/node_modules/webpack-cli/bin/utils/convert-argv.js:116:6)
    at /app/node_modules/webpack-cli/bin/utils/convert-argv.js:123:17
    at Array.forEach (<anonymous>) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/app/node_modules/@symfony/webpack-encore/lib/plugins/stimulus-bridge.js',
    '/app/node_modules/@symfony/webpack-encore/lib/config-generator.js',
    '/app/node_modules/@symfony/webpack-encore/index.js',
    '/app/webpack.config.js',
    '/app/node_modules/webpack-cli/bin/utils/convert-argv.js',
    '/app/node_modules/webpack-cli/bin/cli.js',
    '/app/node_modules/webpack/bin/webpack.js',
    '/app/node_modules/@symfony/webpack-encore/bin/encore.js'
  ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Building with the previous version: @symfony/webpack-encore@0.31.1 works fine:

/app $ yarn add @symfony/webpack-encore@0.31.1 --dev
yarn add v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
warning mini-css-extract-plugin@0.4.2: Invalid bin field for "mini-css-extract-plugin".
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > sass-loader@9.0.3" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
warning " > vue-loader@15.9.5" has unmet peer dependency "css-loader@*".
warning " > vue-loader@15.9.5" has unmet peer dependency "webpack@^3.0.0 || ^4.1.0 || ^5.0.0-0".
[4/4] Building fresh packages...
warning Your current version of Yarn is out of date. The latest version is "1.22.5", while you're on "1.22.4".
info To upgrade, run the following command:
$ apk update && apk add -u yarn
success Saved 0 new dependencies.
Done in 20.07s.
/app $ yarn encore production
yarn run v1.22.4
$ /app/node_modules/.bin/encore production
Running webpack ...

 RECOMMEND  To create a smaller (and CSP-compliant) build, see https://symfony.com/doc/current/frontend/encore/vuejs.html#runtime-compiler-build
 DONE  Compiled successfully in 8672ms                                                                                                                    11:42:34 AM

 I  11 files written to public/build

Is this something I'm doing wrong, or something within the release that's not quite right?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions