Hi,
Files won't compile for production use.
Files should compile for production.
I get an issue when running ./console vue:build SimpleVue
.
Full output:
$ ./console vue:build SimpleVue
Building SimpleVue...
ERROR Build failed with errors.
Failed:
ERROR Failed to compile with 3 errors2:43:57 PM
error in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/index.ts
[tsl] ERROR in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/index.ts(9,10)
TS2305: Module '"./SimpleVueComponent/SimpleVueComponent.vue"' has no exported member 'default'.
error in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/SimpleVueComponent/SimpleVueComponent.adapter.ts
[tsl] ERROR in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/SimpleVueComponent/SimpleVueComponent.adapter.ts(9,40)
TS2307: Cannot find module 'CoreHome' or its corresponding type declarations.
error in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/SimpleVueComponent/SimpleVueComponent.vue.ts
[tsl] ERROR in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/SimpleVueComponent/SimpleVueComponent.vue.ts(3,22)
TS7006: Parameter 'n' implicitly has an 'any' type.
ERROR Failed to compile with 3 errors2:43:58 PM
error in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/index.ts
[tsl] ERROR in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/index.ts(9,10)
TS2305: Module '"./SimpleVueComponent/SimpleVueComponent.vue"' has no exported member 'default'.
error in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/SimpleVueComponent/SimpleVueComponent.adapter.ts
[tsl] ERROR in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/SimpleVueComponent/SimpleVueComponent.adapter.ts(9,40)
TS2307: Cannot find module 'CoreHome' or its corresponding type declarations.
error in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/SimpleVueComponent/SimpleVueComponent.vue.ts
[tsl] ERROR in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/SimpleVueComponent/SimpleVueComponent.vue.ts(3,22)
TS7006: Parameter 'n' implicitly has an 'any' type.
ERROR Failed to compile with 3 errors2:43:58 PM
error in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/index.ts
[tsl] ERROR in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/index.ts(9,10)
TS2305: Module '"./SimpleVueComponent/SimpleVueComponent.vue"' has no exported member 'default'.
error in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/SimpleVueComponent/SimpleVueComponent.adapter.ts
[tsl] ERROR in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/SimpleVueComponent/SimpleVueComponent.adapter.ts(9,40)
TS2307: Cannot find module 'CoreHome' or its corresponding type declarations.
error in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/SimpleVueComponent/SimpleVueComponent.vue.ts
[tsl] ERROR in /usr/local/var/www/matomo/plugins/SimpleVue/vue/src/SimpleVueComponent/SimpleVueComponent.vue.ts(3,22)
TS7006: Parameter 'n' implicitly has an 'any' type.
It works fine when running with the --watch
option.
./console vue:build SimpleVue --watch
таз Building for development as library (commonjs,umd,umd-min)... DONE Compiled successfully in 4939ms2:49:16 PM
DONE Compiled successfully in 4984ms2:49:17 PM
DONE Compiled successfully in 5019ms2:49:17 PM
File Size Gzipped
plugins/SimpleVue/vue/dist/SimpleVue.d 50.06 KiB 7.86 KiB
evelopment.umd.min.js
plugins/SimpleVue/vue/dist/SimpleVue.d 50.06 KiB 7.86 KiB
evelopment.umd.js
plugins/SimpleVue/vue/dist/SimpleVue.d 49.47 KiB 7.68 KiB
evelopment.common.js
Images and other types of assets omitted.
No issues found.
No issues found.
No issues found.
Also my editor is always nagging about the:
Cannot find module 'CoreHome' or its corresponding type declarations.ts(2307)
The only issue in the logs, which I get all the time, so it should be unrelated.
***
Severity: WARNING
Tag: TrackerDomain
Datetime: 2022-05-11 12:23:37 UTC
Request id: a3613
Message: /usr/local/var/www/matomo/plugins/TrackerDomain/TrackerDomain.php(106): Warning - Undefined array key "url" - Matomo 4.8.0
***
I don't want to tamper with files from the original Matomo repo, because I might jump between computers, environments or other settings, so it would be nice to have it fixed properly instead of having to apply a patch every time I need to compile the files.
But my gut feeling says to look into:
tsconfig.json
tsconfig.spec.json
vue.config.json
I've tried installing npm every way possible, I even tried with yarn.
I added a repo with a SimpleVue plugin. With how to reproduce the errors.
Br, Jorge
@diosmosis are you able to help here?
@jorgeuos can you run ./console vue:build CoreHome
? The types for that plugin need to be built first. (Note: you can see this from the TypeScript errors.)