Error in the bin/watch-administration.sh command

I installed Shopware 6.5 in my system. And this Shopware was installed correctly, there is no problem.

Everything works correctly, but when I run the bin/watch-administration.sh command, I get this error.

System:
Ubuntu 22.04
node v18.18.2
npm 9.8.1

what did I do to fix the problem:

  1. I uninstalled all installed plugins.
  2. Even I deleted Shopware once and reinstalled it twice.
  3. I added export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 in the.env file
  4. Run sudo bin/watch-administration.sh, sudo -u www-data bin/watch-administration.sh doesn’t help.

PS

  • commend bin/build-administration.sh doesn’t have a problem. it is run properly.
  • I can run bin/watch-administration.sh in Shopware 6.4 without any problem

Error:

bin/watch-administration.sh
Cannot load Xdebug - it was already loaded

                                                                                                                    
 [OK] Dumped plugin configuration.                                                                                  
                                                                                                                    

Cannot load Xdebug - it was already loaded

                                                                                                                    
 [OK] Successfully dumped js feature configuration                                                                  
                                                                                                                    


> administration@1.0.0 dev
> mode=development webpack-dev-server

# Compiling with Webpack configuration
# Development mode is activated 🛠
BaseUrl for proxy is set to "http://shopware656.test/"
PORT not defined. Using 8080 as default
# Plugin "Storefront": Injected successfully

Calling reporter service for incremental check.
  Changed files: []
  Deleted files: []
ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /var/www/html/shopware656/vendor/shopware/administration/Resources/app/administration/static, /var/www/html/shopware656/vendor/shopware/administration/Resources/app/administration/static, /var/www/html/shopware656/vendor/shopware/administration/Resources/app/administration/static, /var/www/html/shopware656/vendor/shopware/storefront/Resources/app/administration/static
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme


 WARNING  Compiled with 5 warnings                                                                       12:34:40 PM

 warning  in ./node_modules/vue-i18n_v3/dist/vue-i18n.esm-bundler.js

"export 'Fragment' was not found in 'vue'

 warning  in ./node_modules/vue-i18n_v3/dist/vue-i18n.esm-bundler.js

"export 'Text' was not found in 'vue'

 warning  in ./src/index.ts

"export 'configureCompat' was not found in 'vue'

 warning  in ./src/app/adapter/view/vue.adapter.ts

"export 'createApp' was not found in 'vue'

 warning  in ./node_modules/vue-i18n_v3/dist/vue-i18n.esm-bundler.js

"export 'createVNode' was not found in 'vue'

⚠ 「wdm」: Child
    Time: 32746ms
    Entrypoint app = bundles/administration/static/css/app.css bundles/administration/static/js/app.js
       5837 modules
    
    WARNING in ./node_modules/vue-i18n_v3/dist/vue-i18n.esm-bundler.js 1239:11-19
    "export 'Fragment' was not found in 'vue'
    
    WARNING in ./node_modules/vue-i18n_v3/dist/vue-i18n.esm-bundler.js 274:23-27
    "export 'Text' was not found in 'vue'
    
    WARNING in ./src/index.ts 10:0-15
    "export 'configureCompat' was not found in 'vue'
    
    WARNING in ./src/app/adapter/view/vue.adapter.ts 11:10-19
    "export 'createApp' was not found in 'vue'
    
    WARNING in ./node_modules/vue-i18n_v3/dist/vue-i18n.esm-bundler.js 274:11-22
    "export 'createVNode' was not found in 'vue'
Child
    Time: 6221ms
    Entrypoint storefront = css/storefront.css js/storefront.js
       78 modules
ℹ 「wdm」: Compiled with warnings.
ERROR in src/app/mixin/placeholder.mixin.ts:16:34
TS2694: Namespace 'EntitySchema' has no exported member 'Entity'.
    14 |     methods: {
    15 |         placeholder<EntityName extends keyof EntitySchema.Entities>(
  > 16 |             entity: EntitySchema.Entity<EntityName>,
       |                                  ^^^^^^
    17 |             field: keyof EntitySchema.Entity<EntityName>,
    18 |             fallbackSnippet: string,
    19 |         ) {

ERROR in src/app/mixin/placeholder.mixin.ts:17:39
TS2694: Namespace 'EntitySchema' has no exported member 'Entity'.
    15 |         placeholder<EntityName extends keyof EntitySchema.Entities>(
    16 |             entity: EntitySchema.Entity<EntityName>,
  > 17 |             field: keyof EntitySchema.Entity<EntityName>,
       |                                       ^^^^^^
    18 |             fallbackSnippet: string,
    19 |         ) {
    20 |             if (!entity) {

ERROR in src/app/mixin/placeholder.mixin.ts:24:13
TS2578: Unused '@ts-expect-error' directive.
    22 |             }
    23 |
  > 24 |             // @ts-expect-error - we know it is a string because we check it beforehand
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    25 |             if (Shopware.Utils.types.isString(entity[field]) && entity[field].length > 0) {
    26 |                 return entity[field];
    27 |             }

ERROR in src/app/mixin/placeholder.mixin.ts:32:13
TS2578: Unused '@ts-expect-error' directive.
    30 |             // Return the field from parent translation if set
    31 |             const parentLanguageId = Shopware.Context.api.language ? Shopware.Context.api.language.parentId : null;
  > 32 |             // @ts-expect-error - we just check if translations exists
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    33 |             if (parentLanguageId && parentLanguageId.length > 0 && entity.translations) {
    34 |                 // @ts-expect-error - we had checked if translations exists
    35 |                 const translation = (entity.translations as unknown as {

ERROR in src/app/mixin/placeholder.mixin.ts:34:17
TS2578: Unused '@ts-expect-error' directive.
    32 |             // @ts-expect-error - we just check if translations exists
    33 |             if (parentLanguageId && parentLanguageId.length > 0 && entity.translations) {
  > 34 |                 // @ts-expect-error - we had checked if translations exists
       |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    35 |                 const translation = (entity.translations as unknown as {
    36 |                     [key: string]: string,
    37 |                 }[]).find((entry) => {

ERROR in src/app/mixin/placeholder.mixin.ts:49:13
TS2578: Unused '@ts-expect-error' directive.
    47 |             }
    48 |
  > 49 |             // @ts-expect-error - we check if the field exists
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    50 |             // Return the field from translated if set
    51 |             // eslint-disable-next-line @typescript-eslint/no-unsafe-call
    52 |             if (entity.translated != null && entity.translated.hasOwnProperty(field)) {

ERROR in src/app/mixin/placeholder.mixin.ts:53:17
TS2578: Unused '@ts-expect-error' directive.
    51 |             // eslint-disable-next-line @typescript-eslint/no-unsafe-call
    52 |             if (entity.translated != null && entity.translated.hasOwnProperty(field)) {
  > 53 |                 // @ts-expect-error - we check if the field exists beforehand
       |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    54 |                 if (entity.translated[field] !== null) {
    55 |                     // @ts-expect-error - we check if the field exists beforehand
    56 |                     // eslint-disable-next-line @typescript-eslint/no-unsafe-return

ERROR in src/app/mixin/placeholder.mixin.ts:55:21
TS2578: Unused '@ts-expect-error' directive.
    53 |                 // @ts-expect-error - we check if the field exists beforehand
    54 |                 if (entity.translated[field] !== null) {
  > 55 |                     // @ts-expect-error - we check if the field exists beforehand
       |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    56 |                     // eslint-disable-next-line @typescript-eslint/no-unsafe-return
    57 |                     return entity.translated[field];
    58 |                 }

ERROR in src/core/data/entity-definition.data.ts:37:35
TS2694: Namespace 'EntitySchema' has no exported member 'Entity'.
    35 | // eslint-disable-next-line sw-deprecation-rules/private-feature-declarations
    36 | export default class EntityDefinition<EntityName extends keyof EntitySchema.Entities> {
  > 37 |     readonly entity: EntitySchema.Entity<EntityName>;
       |                                   ^^^^^^
    38 |
    39 |     readonly properties: Properties;
    40 |

ERROR in src/core/data/entity-definition.data.ts:41:64
TS2694: Namespace 'EntitySchema' has no exported member 'Entity'.
......
1 „Gefällt mir“

Hello,

I have the same issue right now. Have you ever resolved it?

Try to run npm install in the root folder.

Hello, Not yet , The appearance of this problem does not affect the development, I just ignore it

2 „Gefällt mir“

I did before. It doesn’t help

Thanks!

Doesn’t work either, sadly.
It doesn’t affect development other than spamming the command line on startup, so I guess, I’ll live with it.

In Shopware 6.5.73 (in dockware/dev:latest) I get different errors and warnings:

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @vue/server-renderer@3.3.4
npm WARN Found: vue@3.3.4
...
npm WARN Could not resolve dependency:
npm WARN peer overridden vue@"2.7.14" (was "3.3.4") from @vue/server-renderer@3.3.4
npm WARN node_modules/vue3/node_modules/@vue/server-renderer
npm WARN   @vue/server-renderer@"3.3.4" from vue3@3.3.4
...
 WARNING  Compiled with 5 warnings                                                                      12:11:07 PM
 warning  in ./node_modules/vue-i18n_v3/dist/vue-i18n.esm-bundler.js
"export 'Fragment' was not found in 'vue'
 warning  in ./node_modules/vue-i18n_v3/dist/vue-i18n.esm-bundler.js
"export 'Text' was not found in 'vue'
 warning  in ./src/index.ts
"export 'configureCompat' was not found in 'vue'
 warning  in ./src/app/adapter/view/vue.adapter.ts
"export 'createApp' was not found in 'vue'
 warning  in ./node_modules/vue-i18n_v3/dist/vue-i18n.esm-bundler.js

followed by an extensive stack trace of errors

  • ERROR in scripts/entitySchemaConverter/convert-schema.ts:1:26
    TS2307: Cannot find module ‚…/…/test/mocks/entity-schema.json‘ or its corresponding type declarations.

  • ERROR in scripts/entitySchemaConverter/generate-package.ts:3:26
    TS2307: Cannot find module ‚…/…/test/mocks/entity-schema.json‘ or its corresponding type declarations.

  • ERROR in src/app/component/form/sw-dynamic-url-field/index.ts:38:51
    TS2344: Type ‚„category“‘ does not satisfy the constraint ‚keyof Entities‘.

  • ERROR in src/app/component/form/sw-dynamic-url-field/index.ts:73:46
    TS2344: Type ‚„category“‘ does not satisfy the constraint ‚keyof Entities‘.

etc.

I am not sure if the watcher is actually watching though.
When I change something in my plugin’s admin code, nothing happens.

Hi,

in shopware 6.5.8.5 i still get the same error. But it only occurs in the production system.

    WARNING in ./src/index.ts 10:0-15
    "export 'configureCompat' was not found in 'vue'
    
    WARNING in ./src/app/adapter/view/vue.adapter.ts 11:10-19
    "export 'createApp' was not found in 'vue'
    
    ERROR in ./node_modules/vue-i18n_v3/dist/vue-i18n.mjs 1247:37-45
    "export 'Fragment' was not found in 'vue'
    
    ERROR in ./node_modules/vue-i18n_v3/dist/vue-i18n.mjs 1265:11-19
    "export 'Fragment' was not found in 'vue'
    
    ERROR in ./node_modules/vue-i18n_v3/dist/vue-i18n.mjs 266:23-27
    "export 'Text' was not found in 'vue'
    
    ERROR in ./node_modules/vue-i18n_v3/dist/vue-i18n.mjs 266:11-22
    "export 'createVNode' was not found in 'vue'
    
    ERROR in ./node_modules/vue-i18n_v3/dist/vue-i18n.mjs 70:13-27
    Can't import the named export 'CoreErrorCodes' from non EcmaScript module (only default export is available)
    
    ERROR in ./node_modules/vue-i18n_v3/dist/vue-i18n.mjs 42:15-28
    Can't import the named export 'CoreWarnCodes' from non EcmaScript module (only default export is available)
    
    ERROR in ./node_modules/vue-i18n_v3/dist/vue-i18n.mjs 1489:47-75
    Can't import the named export 'DATETIME_FORMAT_OPTIONS_KEYS' from non EcmaScript module (only default export is available)
    
    ERROR in ./node_modules/vue-i18n_v3/dist/vue-i18n.mjs 311:14-28
    Can't import the named export 'DEFAULT_LOCALE' from non EcmaScript module (only default export is available)

and so on.

If I change the vue Version from 3.3.4 to 2.7.14 in the file: vendor/shopware/administration/Resources/app/administration/package-lock.json it works. But I don’t always want to edit this file after every deployment.

Is there any solution for this?

Adding this line to my ~/.npmrc file made wonders:

legacy-peer-deps=true

I had the same problem, I changed the NodeJS version from 21 to 20.0.0, and now everything works.

1 „Gefällt mir“