Saya mengalami error saat menjalankan webpack setelah menginstal Akeneo 3.1.6 CE secara manual. Informasi versi di bawah ini:
operating system: MacOSX
php: 7.2.13
node: v10.16.0
yarn: 1.16.0
mysql: 5.7
Kesalahannya:
$ yarn run webpack
yarn run v1.16.0
$ yarn requirements && NODE_PATH=node_modules webpack --config $npm_package_config_source/webpack.config.js
$ node $npm_package_config_source/frontend/build/check-requirements.js
Checking PIM frontend requirements
Starting webpack from /Users/liamtoohey/src/project-akeneo in dev mode
Executing pre-build scripts
(node:19219) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
$ node $npm_package_config_source/frontend/build/update-extensions.js
$ node $npm_package_config_styles
Updating form extensions.json
/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/frontend/build/update-extensions.js:76
const mergedExtensions = Object.entries(merged.extensions).map(([code, extension]) => {
^
TypeError: Cannot convert undefined or null to object
at Function.entries (<anonymous>)
at mergeExtensions (/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/frontend/build/update-extensions.js:76:37)
at Object.<anonymous> (/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/frontend/build/update-extensions.js:110:26)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
/Users/liamtoohey/src/project-akeneo/node_modules/webpack-shell-plugin/lib/index.js:168
throw error;
^
1
Tampaknya ekstensi formulir hilang? Saya berjuang untuk men-debug ini karena saya memiliki contoh vanilla tanpa kode khusus. Berkenaan dengan langkah-langkah pembuatan FE yang telah saya jalankan, saya telah mengikuti panduan di sini https://docs.akeneo.com/3.1/install_pim/docker/installation_docker.html
Perintah install selesai tanpa masalah, DB terlihat bagus juga. Saya belum dapat mereplikasi kesalahan ini saat mengatur melalui buruh pelabuhan yang tampaknya aneh.
Hai! Dapatkah Anda mengatakan pada langkah mana Anda mengalami kesalahan ini? (atau atas perintah yang mana?)
Sistem mana yang Anda gunakan? (buruh pelabuhan atau lainnya?)
Hai @Doodoune ! Saya menyiapkan proyek ini secara lokal menggunakan MacOSX. Pengaturan lokal saya mirip dengan MAMP namun saya menggunakan brew untuk mengelola PHP / benang / node dll. Saya mendapatkan kesalahan ini saat menjalankan yarn run webpack
seperti yang ditentukan di sini https://docs.akeneo.com/3.1/install_pim /manual/installation_ce_archive.html#initializing -akeneo
Melihat perubahan yang dibuat dalam PR ini https://github.com/akeneo/pim-community-dev/pull/9607 tampaknya node tidak membuang data apa pun ke /js/extensions.json
- mungkin terkait dengan kesalahan. Perintah seperti yarn install
berjalan dengan baik untuk saya namun - apakah saya melewatkan satu langkah?
@Doodoune Mendapat pembaruan menarik. Tampaknya ada bug dalam perintah regex berikut:
Proyek akeneo saya saat ini berada di direktori src
. Galat yang saya alami tampaknya disebabkan oleh kesalahan alur file yang dibaca dari web/js/require-paths.js
. Contoh isi web/js/require-paths.js
:
module.exports = ["/Users/liamtoohey/src/project-akeneo/vendor/doctrine/doctrine-bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/doctrine/doctrine-cache-bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/sensio/framework-extra-bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/symfony/monolog-bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/symfony/swiftmailer-bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/doctrine/doctrine-fixtures-bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/friendsofsymfony/jsrouting-bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/friendsofsymfony/rest-bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/liip/imagine-bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Oro/Bundle/ConfigBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Oro/Bundle/DataGridBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Oro/Bundle/FilterBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Oro/Bundle/SecurityBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Oro/Bundle/TranslationBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Tool/Bundle/ConnectorBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Tool/Bundle/ClassificationBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Tool/Bundle/VersioningBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Tool/Bundle/ElasticsearchBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Tool/Bundle/BatchBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Tool/Bundle/BatchQueueBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Tool/Bundle/BufferBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Tool/Bundle/FileStorageBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Tool/Bundle/MeasureBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Tool/Bundle/StorageUtilsBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/doctrine/doctrine-migrations-bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/friendsofsymfony/oauth-server-bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Tool/Bundle/ApiBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/oneup/flysystem-bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Oro/Bundle/PimFilterBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Oro/Bundle/PimDataGridBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/UserManagement/Bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Channel/Bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Enrichment/Bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Structure/Bundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Platform/Bundle/DashboardBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Platform/Bundle/AnalyticsBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Platform/Bundle/ImportExportBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Platform/Bundle/InstallerBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Platform/Bundle/NotificationBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Platform/Bundle/UIBundle",
"/Users/liamtoohey/src/project-akeneo/vendor/akeneo/pim-community-dev/src/Akeneo/Platform/Bundle/CatalogVolumeMonitoringBundle"]
Seperti yang Anda lihat, proyek ini /Users/liamtoohey/src
. Ini tampaknya menyebabkan masalah dengan perintah regex yang ditautkan sebelumnya karena perintah ini hanya menghapus karakter hingga string src
, yang dalam hal ini bukan direktori src
dalam Akeneo - tetapi direktori kerja saya . Beberapa contoh dapat ditemukan di sini: https://regex101.com/r/8GRLUq/1
Karena ini, jalur file dalam variabel dir
sini https://github.com/akeneo/pim-community-dev/blob/v3.1.6/frontend/build/update-extensions.js#L60 look Suka
...
src/project-akeneo/vendor/akeneo/pim-community-dev/src/Oro/Bundle/ConfigBundle
src/project-akeneo/vendor/akeneo/pim-community-dev/src/Oro/Bundle/DataGridBundle
src/project-akeneo/vendor/akeneo/pim-community-dev/src/Oro/Bundle/FilterBundle
src/project-akeneo/vendor/akeneo/pim-community-dev/src/Oro/Bundle/SecurityBundle
src/project-akeneo/vendor/akeneo/pim-community-dev/src/Oro/Bundle/TranslationBundle
...
Kapan seharusnya terlihat seperti:
...
/Users/liamtoohey/src/vendor/akeneo/pim-community-dev/src/Oro/Bundle/ConfigBundle
/Users/liamtoohey/src/vendor/akeneo/pim-community-dev/src/Oro/Bundle/DataGridBundle
/Users/liamtoohey/src/vendor/akeneo/pim-community-dev/src/Oro/Bundle/FilterBundle
/Users/liamtoohey/src/vendor/akeneo/pim-community-dev/src/Oro/Bundle/SecurityBundle
/Users/liamtoohey/src/vendor/akeneo/pim-community-dev/src/Oro/Bundle/TranslationBundle
...
@Doodoune Ada pembaruan tentang ini? Saya telah meningkatkan PR untuk mengubah ekspresi reguler yang menyebabkan masalah ini 🙂
Saya memiliki masalah yang sama. Saya membuat paket (diinstal dari komposer) yang memiliki direktori src / dan di dalam form_extensions. Ekstensi tersebut tidak dimuat karena regex ini di update-extensions.js. Bisakah Anda memperbaikinya? Mungkin itu
@liamjtoohey perbaiki regex ini dan cukup untuk menerima PR-nya.
Rusak di 3.2 juga
@liamjtoohey Hai, kontribusi Anda telah digabungkan menjadi master di sini: # 10568 terima kasih lagi!
@tamarasaurus Bukankah masalah ini harus di-back-port di Akeneo 3.2?
Komentar yang paling membantu
@Doodoune Mendapat pembaruan menarik. Tampaknya ada bug dalam perintah regex berikut:
Proyek akeneo saya saat ini berada di direktori
src
. Galat yang saya alami tampaknya disebabkan oleh kesalahan alur file yang dibaca dariweb/js/require-paths.js
. Contoh isiweb/js/require-paths.js
:Seperti yang Anda lihat, proyek ini
/Users/liamtoohey/src
. Ini tampaknya menyebabkan masalah dengan perintah regex yang ditautkan sebelumnya karena perintah ini hanya menghapus karakter hingga stringsrc
, yang dalam hal ini bukan direktorisrc
dalam Akeneo - tetapi direktori kerja saya . Beberapa contoh dapat ditemukan di sini: https://regex101.com/r/8GRLUq/1Karena ini, jalur file dalam variabel
dir
sini https://github.com/akeneo/pim-community-dev/blob/v3.1.6/frontend/build/update-extensions.js#L60 look SukaKapan seharusnya terlihat seperti: