:bug: ๋ฒ๊ทธ๋ฅผ ๋ณด๊ณ ํฉ๋๋ค :bug:
์๋
ํ์ธ์, ์ด ํ์ด์ง์ ์ค๋ช
๋ ๋๋ก ์์ ์์ด ์ต์ ๋ฒ์ ์ akeneo 3.2๋ฅผ ์ค์นํ๋ ค๊ณ ํฉ๋๋ค. yarn run webpack
์คํํ ๋๊น์ง ๋ชจ๋ ๊ฒ์ด ๊ด์ฐฎ์ ๊ฒ ๊ฐ์ต๋๋ค. ์คํํ๋ฉด ๋ค์๊ณผ ๊ฐ์ด ์ถ๋ ฅ๋ฉ๋๋ค.
yarn run v1.22.5
$ yarn requirements && NODE_PATH=node_modules webpack --config $npm_package_config_source/webpack.config.js --env=prod
$ node $npm_package_config_source/frontend/build/check-requirements.js
Checking PIM frontend requirements
Starting webpack from /data/web/build/src in prod mode
Executing pre-build scripts
(node:8043) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
$ node $npm_package_config_styles
$ node $npm_package_config_source/frontend/build/update-extensions.js
Updating form extensions.json
Starting LESS compilation
โฃ vendor/akeneo/pim-community-dev/src/Oro/Bundle/PimDataGridBundle/Resources/public/less/index.less
โฃ vendor/akeneo/pim-community-dev/src/Akeneo/Platform/Bundle/UIBundle/Resources/public/less/index.less
โ Saved CSS to web/css/pim.css
Version: webpack 4.29.6
Time: 29633ms
Built at: 09/08/2020 7:09:36 PM
2 assets
Entrypoint main = vendor.min.js main.min.js
ERROR in /data/web/build/src/web/bundles/pimdatagrid/js/datagrid/column-selector.ts
./web/bundles/pimdatagrid/js/datagrid/column-selector.ts
[tsl] ERROR in /data/web/build/src/web/bundles/pimdatagrid/js/datagrid/column-selector.ts(466,5)
TS2322: Type 'Partial<{ [name: string]: Column; }>' is not assignable to type '{ [name: string]: Column; }'.
Index signatures are incompatible.
Type 'Column | undefined' is not assignable to type 'Column'.
Type 'undefined' is not assignable to type 'Column'.
ERROR in /data/web/build/src/web/bundles/pimui/js/view/base.ts
./web/bundles/pimui/js/view/base.ts
[tsl] ERROR in /data/web/build/src/web/bundles/pimui/js/view/base.ts(94,28)
TS2538: Type 'undefined' cannot be used as an index type.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
webpack์ ๋ฌธ์ ๊ฐ ๋ฐ์ํ๊ณ ์์ง๋ง ์ค์ ๋ก ์ฌ๊ธฐ์ ๋ฌด์จ ์ผ์ด ์ผ์ด๋๊ณ ์๋์ง ์ ํ ์ ์ ์์ต๋๋ค. ๋ฌด์์ด ์๋ชป๋ ์ ์๊ณ ์ด๋ป๊ฒ ํด๊ฒฐํ ์ ์๋์ง ์๊ณ ๊ณ์ญ๋๊น?
์ฒด๊ณ
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
php -v
PHP 7.2.30-1hypernode20200420.033518 (cli) (built: Apr 19 2020 07:47:19) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.3.8, Copyright (c) 2002-2019, by ionCube Ltd.
with Zend OPcache v7.2.30-1hypernode20200420.033518, Copyright (c) 1999-2018, by Zend Technologies
md5-0adaed2690a3db8d913c2d72889e49a7
```console
yarn -v
1.22.5
์ต์ ๋ฒ์ ์ ๋ค์ด๋ก๋ํ๊ธฐ ์ํ ๋ค์ด๋ก๋ ๋งํฌ ๊ฐ 3.2.69 ๋์ akeneo 3.2.34๋ก ์์นด์ด๋ธ๋๋ ๊ฒ์ ํ์ธํ์ต๋๋ค. ์ด๊ฒ์ด ๊ด๋ จ์ด ์์ ์ ์์ต๋๊น?
์๋ ํ์ธ์ @marcoveeneman ,
์๋์, ๊ด๋ จ์ด ์์ต๋๋ค. ๋ง์ง๋ง 3.2 ๋ฆด๋ฆฌ์ค๋ฅผ ๋ค์ด๋ก๋ํ ์ ์๋ ์ด์ ๋ฅผ ์์๋ณด๊ธฐ ์ํด ํ๊ณผ ํจ๊ป ํ์ธํ๊ฒ ์ต๋๋ค.
Yarn ๋ฌธ์ ์ ๊ฒฝ์ฐ ์ต๊ทผ์ ๋ฌด์ธ๊ฐ ๋ณ๊ฒฝ๋์์ ๊ฒ์ ๋๋ค. ์ค๋ ์ฐ๋ฆฌ์ ๋ชจ๋ ์ผ๊ฐ ๋น๋๊ฐ ๋นจ๊ฐ์์ผ๋ก ๋ฐ๋์์ต๋๋ค.
๋ฌธ์ ์ธ์ฌ,
์ ์ด์
์ค๋ ์์นจ์ v3.2.69 ๋ฐ v3.2.58์์ ๋์ผํ ๋ฒ๊ทธ๊ฐ ์ค์น๋์์ต๋๋ค.
#12706 ๋ฐ https://github.com/akeneo/pim-community-standard/pull/1386์ ์ํด ์์ ๋์์ต๋๋ค.
v3.2.70์์ ๋ฒ๊ทธ๊ฐ ์์ ๋์์ต๋๊น? ์ ๊ทธ๋ ์ด๋ ํ์๋ ์ฌ์ ํ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
3.1.18 ๋ฐ 3.1.2์ฉ ์์ฐ์ ์ปดํ์ผํ๋ ๋์ ์ฌ์ ํ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
์ฌ์ฉ๋ ํจํค์ง๋ ์ฌ์ฉ๋ ๊ฒ์ผ๋ก ์ถ์ ๋ฉ๋๋ค.
์ด ๋ฌธ์ ๋ฅผ ์ด๋ป๊ฒ ๊ณ ์น ์ ์์ต๋๊น?
[ํธ์งํ๋ค]
์ด๊ฒ์ ๋๊ตฐ๊ฐ๋ฅผ ๋์ธ ์ ์์ต๋๋ค.
yarn add @types/[email protected]
์ด๋ค ํด๊ฒฐ์ฑ ์ด ์์ต๋๊น? ๋ด Akeneo์์๋ ์๋ํ์ง ์์์ต๋๋ค...
๊ทธ๋ฆฌ๊ณ ๊ทธ๋ณด๋ค ๋ ์ต์ ์ธ ๊ฒ์ 3.2์์ 4.0์ผ๋ก ์ ๊ทธ๋ ์ด๋ํ๋ ค๊ณ ์๋ํ ํ ๋ฐ์ดํฐ๋ฒ ์ด์ค๊ฐ ์์๋์๋ค๋ ๊ฒ์ ๋๋ค. ์ด์ ์ ์ํํ ๋ฐฑ์ ์ด ์๋์๋ค๋ฉด ๋ชจ๋ Akeneo๋ฅผ ๋ง์ณค์ ๊ฒ์ ๋๋ค.
๋ํ ์๋ก์ด akeneo Docker ์ค์น์์ ์ด ์นํฉ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค. ์์์ ์ธ๊ธํ ์์ ์ฌํญ์ ๋ด ์ค์น์์ ์๋ํ์ง ์์ต๋๋ค.
์ฐ๋ฆฌ๋ ์ ํํ ๊ฐ์ ๋ฌธ์ ๋ฅผ ๊ฒช์์ต๋๋ค. ์ผ๋ถ ์ข ์์ฑ์ ๋ฒ์ ์ ํน์ ๋ฒ์ ์ ๊ณ ์ ๋์ด ์์ง ์์ง๋ง ๋ค๋ฅธ ๋ฒ์ ์ ๊ณ ์ ๋์ด ์์ต๋๋ค. ์ด๋ก ์ธํด ํธํ์ฑ ๋ฌธ์ ๊ฐ ๋ฐ์ํ์ผ๋ฉฐ ํฅํ์๋ ํธํ์ฑ ๋ฌธ์ ๊ฐ ๋ค์ ๋ฐ์ํ ๊ฒ์ ๋๋ค.
ํ์ฌ ๋ ๊ฐ์ง ์ข ์์ฑ์ ๋ณ๊ฒฝํ๋ฉด ์นํฉ ๋ฌธ์ ์ธ typescript์ ๋ฐ์ค์ด ์์ ๋ฉ๋๋ค.
yarn add [email protected] @types/[email protected]
์ด ๋ช ๋ น์ ๋ฒ์ ์ ๋งค์ฐ ์ค์ํฉ๋๋ค. Typescript๋ "tag-for-publishing-older-releases"์ด๊ธฐ ๋๋ฌธ์ 3.6.5์ ๊ณ ์ ๋์ด์ผ ํฉ๋๋ค. ๊ทธ๋ฆฌ๊ณ @types/underscore๋ package.json์ types/underscore ๋ฒ์ ์ธ 1.8.3์ ๊ณ ์ ๋์ด์ผ ํฉ๋๋ค.
์ฌ๋ฌ ์๋(Centos 8)๋ฅผ ํฌ๊ธฐํ๊ณ Ubuntu 18.04์ ์ค์นํ ํ - ๋ฒ์ 4.0.70์ ์๋ก์ด ๋์ปค ์ค์น ์ ์ค๋ฅ๊ฐ ํ์๋์ง ์์์ต๋๋ค.
๋๋ ๋น์ ์ ์๋ฃจ์ @stefaanneyts ๋ก ์กฐ๊ธ ๋ฉ๋ฆฌ ๊ฐ ์ ์์์ง๋ง ์ฌ์ ํ
โ Saved CSS to web/css/pim.css
Version: webpack 4.29.6
Time: 14202ms
Built at: 03/09/2021 3:06:47 AM
2 assets
Entrypoint main = vendor.min.js main.min.js
ERROR in /var/www/html/staging/releases/1615231581/web/bundles/pimui/js/view/base.ts
./web/bundles/pimui/js/view/base.ts
[tsl] ERROR in /var/www/html/staging/releases/1615231581/web/bundles/pimui/js/view/base.ts(193,3)
TS2416: Property 'render' in type 'BaseView' is not assignable to the same property in base type 'View'.
Type '() => View' is not assignable to type '() => this'.
ERROR in /var/www/html/staging/releases/1615231581/web/bundles/pimui/js/view/base.ts
./web/bundles/pimui/js/view/base.ts
[tsl] ERROR in /var/www/html/staging/releases/1615231581/web/bundles/pimui/js/view/base.ts(193,3)
TS2416: Property 'render' in type 'BaseView' is not assignable to the same property in base type 'View<any>'.
Type '() => View' is not assignable to type '() => this'.
Type 'View' is not assignable to type 'this'.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@stefaanneyts ๋ช ๋ น์ ์คํํ ํ ๋ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ https://github.com/akeneo/pim-community-dev/issues/13895
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์ฐ๋ฆฌ๋ ์ ํํ ๊ฐ์ ๋ฌธ์ ๋ฅผ ๊ฒช์์ต๋๋ค. ์ผ๋ถ ์ข ์์ฑ์ ๋ฒ์ ์ ํน์ ๋ฒ์ ์ ๊ณ ์ ๋์ด ์์ง ์์ง๋ง ๋ค๋ฅธ ๋ฒ์ ์ ๊ณ ์ ๋์ด ์์ต๋๋ค. ์ด๋ก ์ธํด ํธํ์ฑ ๋ฌธ์ ๊ฐ ๋ฐ์ํ์ผ๋ฉฐ ํฅํ์๋ ํธํ์ฑ ๋ฌธ์ ๊ฐ ๋ค์ ๋ฐ์ํ ๊ฒ์ ๋๋ค.
ํ์ฌ ๋ ๊ฐ์ง ์ข ์์ฑ์ ๋ณ๊ฒฝํ๋ฉด ์นํฉ ๋ฌธ์ ์ธ typescript์ ๋ฐ์ค์ด ์์ ๋ฉ๋๋ค.
yarn add [email protected] @types/[email protected]
์ด ๋ช ๋ น์ ๋ฒ์ ์ ๋งค์ฐ ์ค์ํฉ๋๋ค. Typescript๋ "tag-for-publishing-older-releases"์ด๊ธฐ ๋๋ฌธ์ 3.6.5์ ๊ณ ์ ๋์ด์ผ ํฉ๋๋ค. ๊ทธ๋ฆฌ๊ณ @types/underscore๋ package.json์ types/underscore ๋ฒ์ ์ธ 1.8.3์ ๊ณ ์ ๋์ด์ผ ํฉ๋๋ค.