Rails 6 Webpacker Ошибка развертывания на героку с expose-loader - PullRequest
0 голосов
/ 31 марта 2020

Я получаю эти сообщения об ошибках при развертывании в Heroku с приложением Rails 6.0.2.2 с Webpacker:

remote:        ERROR in js/application-061dc8049445f21b13f5.js from Terser
remote:        TypeError: Cannot read property 'variables' of undefined
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:209686
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:211321
remote:            at AST_Call.optimize (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:137138)
remote:            at ri.before (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:136915)
remote:            at AST_Call.transform (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:84111)
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:87057
remote:            at ri.before (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:136887)
remote:            at AST_Binary.transform (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:84111)
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:87198
remote:            at ri.before (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:136887)
remote:        
remote:        ERROR in js/clever/dataTables-09cafccc76e37898d588.js from Terser
remote:        TypeError: Cannot read property 'variables' of undefined
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:209686
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:211321
remote:            at AST_Call.optimize (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:137138)
remote:            at ri.before (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:136915)
remote:            at AST_Call.transform (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:84111)
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:87057
remote:            at ri.before (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:136887)
remote:            at AST_Binary.transform (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:84111)
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:87198
remote:            at ri.before (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:136887)
remote:        
remote:        ERROR in js/clever/daterangepicker-c9b4113130de43a46e12.js from Terser
remote:        TypeError: Cannot read property 'variables' of undefined
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:209686
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:211321
remote:            at AST_Call.optimize (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:137138)
remote:            at ri.before (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:136915)
remote:            at AST_Call.transform (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:84111)
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:87198
remote:            at ri.before (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:136887)
remote:            at AST_Conditional.transform (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:84111)
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:87198
remote:            at ri.before (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:136887)
remote:        
remote:        ERROR in js/clever/toastr-ba9cff85053676407b56.js from Terser
remote:        TypeError: Cannot read property 'variables' of undefined
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:209686
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:211321
remote:            at AST_Call.optimize (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:137138)
remote:            at ri.before (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:136915)
remote:            at AST_Call.transform (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:84111)
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:84275
remote:            at l (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:931)
remote:            at e (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:1251)
remote:            at Nn (/tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:84249)
remote:            at /tmp/build_c3d5d4e8475dfc04d63bb955b7bee778/node_modules/terser/dist/bundle.min.js:1:86559
remote:        

Я думаю, это может быть связано с тем, что я пытаюсь использовать expose-loader в config/webpack/environments.js загрузить несколько плагинов. Я делаю это неправильно?

Полное сообщение об ошибке, config/webpacker.yml, package.json, config/webpack/environments.js, app/javascript/packs/application.js -> https://gist.github.com/cdesch/1ec9da022d3fc7cc8fa4d219cbc2ecb3

ruby 2.6.5 рельсы 6.0.2.2 npm 6.13.7 пряжа 1.22.4 узел v13.11.0

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...