module-federation-examples
module-federation-examples copied to clipboard
vue-cli example fails on `yarn serve`
Steps to reproduce
- Clone the repo to a new location
- Run
yarn install
on every app folder (consumer, core, other) - Run
yarn serve
on the root folder
Versions
- yarn v1.22.19
- node v16.16.0
Console log
λ yarn serve
yarn run v1.22.19
$ lerna run --scope @vue-cli/* --parallel serve
lerna notice cli v3.22.1
lerna notice filter including "@vue-cli/*"
lerna info filter [ '@vue-cli/*' ]
lerna info Executing command in 3 packages: "yarn run serve"
@vue-cli/consumer: $ vue-cli-service serve
@vue-cli/core: $ vue-cli-service serve
@vue-cli/other: $ vue-cli-service serve
@vue-cli/consumer: INFO Starting development server...
@vue-cli/other: INFO Starting development server...
@vue-cli/core: INFO Starting development server...
[3%] setup (watch run)
@vue-cli/consumer: [3%] setup (watch run)
ERROR Failed to compile with 1 error11:54:43
@vue-cli/consumer: Syntax Error: TypeError: Cannot read properties of undefined (reading 'parseComponent')
@vue-cli/consumer: You may use special comments to disable some warnings.
@vue-cli/consumer: Use // eslint-disable-next-line to ignore the next line.
@vue-cli/consumer: Use /* eslint-disable */ to ignore all warnings in a file.
ERROR Failed to compile with 1 error11:54:43
@vue-cli/core: Syntax Error: TypeError: Cannot read properties of undefined (reading 'parseComponent')
@vue-cli/core: You may use special comments to disable some warnings.
@vue-cli/core: Use // eslint-disable-next-line to ignore the next line.
@vue-cli/core: Use /* eslint-disable */ to ignore all warnings in a file.
ERROR in ./src/App.vue
@vue-cli/consumer: Module Error (from ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js):
@vue-cli/consumer: Vue packages version mismatch:
@vue-cli/consumer: - [email protected] (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\consumer\node_modules\vue\dist\vue.runtime.common.js)
@vue-cli/consumer: - [email protected] (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\consumer\node_modules\vue-template-compiler\package.json)
@vue-cli/consumer: This may cause things to work incorrectly. Make sure to use the same version for both.
@vue-cli/consumer: If you are using vue-loader@>=10.0, simply update vue-template-compiler.
@vue-cli/consumer: If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
@vue-cli/consumer:
@vue-cli/consumer: @ ./src/bootstrap.js 2:0-28 6:13-16
@vue-cli/consumer: @ ./src/main.js 15:0-21
@vue-cli/consumer: ERROR in ./src/App.vue
@vue-cli/consumer: Module build failed (from ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js):
@vue-cli/consumer: TypeError: Cannot read properties of undefined (reading 'parseComponent')
@vue-cli/consumer: at parse (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\consumer\node_modules\@vue\component-compiler-utils\dist\parse.js:15:23)
@vue-cli/consumer: at Object.module.exports (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\consumer\node_modules\@vue\cli-service\node_modules\@vue\vue-loader-v15\lib\index.js:67:22)
@vue-cli/consumer: @ ./src/bootstrap.js 2:0-28 6:13-16
@vue-cli/consumer: @ ./src/main.js 15:0-21
ERROR in ./src/App.vue
@vue-cli/core: Module Error (from ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js):
@vue-cli/core: Vue packages version mismatch:
@vue-cli/core: - [email protected] (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\core\node_modules\vue\dist\vue.runtime.common.js)
@vue-cli/core: - [email protected] (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\core\node_modules\vue-template-compiler\package.json)
@vue-cli/core: This may cause things to work incorrectly. Make sure to use the same version for both.
@vue-cli/core: If you are using vue-loader@>=10.0, simply update vue-template-compiler.
@vue-cli/core: If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
@vue-cli/core:
@vue-cli/core: @ ./src/bootstrap.js 2:0-28 6:13-16
@vue-cli/core: @ ./src/main.js 15:0-21
@vue-cli/core: ERROR in ./src/App.vue
@vue-cli/core: Module build failed (from ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js):
@vue-cli/core: TypeError: Cannot read properties of undefined (reading 'parseComponent')
@vue-cli/core: at parse (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\core\node_modules\@vue\component-compiler-utils\dist\parse.js:15:23)
@vue-cli/core: at Object.module.exports (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\core\node_modules\@vue\cli-service\node_modules\@vue\vue-loader-v15\lib\index.js:67:22)
@vue-cli/core: @ ./src/bootstrap.js 2:0-28 6:13-16
@vue-cli/core: @ ./src/main.js 15:0-21
@vue-cli/core: ERROR in ./src/components/Button.vue
@vue-cli/core: Module Error (from ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js):
@vue-cli/core: Vue packages version mismatch:
@vue-cli/core: - [email protected] (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\core\node_modules\vue\dist\vue.runtime.common.js)
@vue-cli/core: - [email protected] (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\core\node_modules\vue-template-compiler\package.json)
@vue-cli/core: This may cause things to work incorrectly. Make sure to use the same version for both.
@vue-cli/core: If you are using vue-loader@>=10.0, simply update vue-template-compiler.
@vue-cli/core: If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
@vue-cli/core:
@vue-cli/core: @ container entry ./Button[0]
@vue-cli/core: ERROR in ./src/components/Button.vue
@vue-cli/core: Module build failed (from ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js):
@vue-cli/core: TypeError: Cannot read properties of undefined (reading 'parseComponent')
@vue-cli/core: at parse (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\core\node_modules\@vue\component-compiler-utils\dist\parse.js:15:23)
@vue-cli/core: at Object.module.exports (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\core\node_modules\@vue\cli-service\node_modules\@vue\vue-loader-v15\lib\index.js:67:22)
@vue-cli/core: @ container entry ./Button[0]
@vue-cli/core: ERROR in ./src/components/Section.vue
@vue-cli/core: Module Error (from ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js):
@vue-cli/core: Vue packages version mismatch:
@vue-cli/core: - [email protected] (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\core\node_modules\vue\dist\vue.runtime.common.js)
@vue-cli/core: - [email protected] (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\core\node_modules\vue-template-compiler\package.json)
@vue-cli/core: This may cause things to work incorrectly. Make sure to use the same version for both.
@vue-cli/core: If you are using vue-loader@>=10.0, simply update vue-template-compiler.
@vue-cli/core: If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
@vue-cli/core:
@vue-cli/core: @ container entry ./Section[0]
@vue-cli/core: ERROR in ./src/components/Section.vue
@vue-cli/core: Module build failed (from ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js):
@vue-cli/core: TypeError: Cannot read properties of undefined (reading 'parseComponent')
@vue-cli/core: at parse (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\core\node_modules\@vue\component-compiler-utils\dist\parse.js:15:23)
@vue-cli/core: at Object.module.exports (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\core\node_modules\@vue\cli-service\node_modules\@vue\vue-loader-v15\lib\index.js:67:22)
@vue-cli/core: @ container entry ./Section[0]
ERROR Failed to compile with 1 error11:54:44
@vue-cli/other: Syntax Error: TypeError: Cannot read properties of undefined (reading 'parseComponent')
@vue-cli/other: You may use special comments to disable some warnings.
@vue-cli/other: Use // eslint-disable-next-line to ignore the next line.
@vue-cli/other: Use /* eslint-disable */ to ignore all warnings in a file.
ERROR in ./src/App.vue
@vue-cli/other: Module Error (from ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js):
@vue-cli/other: Vue packages version mismatch:
@vue-cli/other: - [email protected] (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\other\node_modules\vue\dist\vue.runtime.common.js)
@vue-cli/other: - [email protected] (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\other\node_modules\vue-template-compiler\package.json)
@vue-cli/other: This may cause things to work incorrectly. Make sure to use the same version for both.
@vue-cli/other: If you are using vue-loader@>=10.0, simply update vue-template-compiler.
@vue-cli/other: If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
@vue-cli/other:
@vue-cli/other: @ ./src/bootstrap.js 2:0-28 6:13-16
@vue-cli/other: @ ./src/main.js 15:0-21
@vue-cli/other: ERROR in ./src/App.vue
@vue-cli/other: Module build failed (from ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js):
@vue-cli/other: TypeError: Cannot read properties of undefined (reading 'parseComponent')
@vue-cli/other: at parse (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\other\node_modules\@vue\component-compiler-utils\dist\parse.js:15:23)
@vue-cli/other: at Object.module.exports (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\other\node_modules\@vue\cli-service\node_modules\@vue\vue-loader-v15\lib\index.js:67:22)
@vue-cli/other: @ ./src/bootstrap.js 2:0-28 6:13-16
@vue-cli/other: @ ./src/main.js 15:0-21
@vue-cli/other: ERROR in ./src/components/MainComponent.vue
@vue-cli/other: Module Error (from ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js):
@vue-cli/other: Vue packages version mismatch:
@vue-cli/other: - [email protected] (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\other\node_modules\vue\dist\vue.runtime.common.js)
@vue-cli/other: - [email protected] (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\other\node_modules\vue-template-compiler\package.json)
@vue-cli/other: This may cause things to work incorrectly. Make sure to use the same version for both.
@vue-cli/other: If you are using vue-loader@>=10.0, simply update vue-template-compiler.
@vue-cli/other: If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
@vue-cli/other:
@vue-cli/other: @ container entry ./MainComponent[0]
@vue-cli/other: ERROR in ./src/components/MainComponent.vue
@vue-cli/other: Module build failed (from ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js):
@vue-cli/other: TypeError: Cannot read properties of undefined (reading 'parseComponent')
@vue-cli/other: at parse (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\other\node_modules\@vue\component-compiler-utils\dist\parse.js:15:23)
@vue-cli/other: at Object.module.exports (C:\Users\nuno.barreiro\Repos\module-federation-examples\vue-cli\other\node_modules\@vue\cli-service\node_modules\@vue\vue-loader-v15\lib\index.js:67:22)
@vue-cli/other: @ container entry ./MainComponent[0]
@vue-cli/other: webpack compiled with 4 errors
Send a pr, try updating the vue dependencies, check git history and try rolling some back if they changed recently