Ошибка сборки микроинтерфейса Nx Angular: «Модуль не найден: ошибка: невозможно разрешить http в…»
Я пытаюсь добавить Cesium в свой проект микроинтерфейса с реализацией федерации модулей. Я установил цезий (не угловой цезий), но когда я пытаюсь это сделатьnpx nx serve shell --devRemotes=map,admin
я получаю следующие ошибки:
Module not found: Error: Can't resolve 'zlib' in '..\node_modules\@cesium\engine\Source\Core'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "zlib": require.resolve("browserify-zlib") }'
- install 'browserify-zlib'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "zlib": false }
и
Error: Module not found: Error: Can't resolve 'https' in '..\node_modules\@cesium\engine\Source\Core'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }'
- install 'https-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "https": false }
и
Error: Module not found: Error: Can't resolve 'http' in '..\node_modules\@cesium\engine\Source\Core'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
- install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "http": false }
Я попытался решить эту проблему с помощью следующих решений:
Сообщество цезия git из цезия git из цезия
но любой из них сработал для меня.
это стекблиц проекта: stackblitz
Кто-нибудь знает, что я делаю неправильно?
Заранее спасибо!