Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update npm package to webpack 5 compatible #975

Open
K1vs opened this issue Jan 28, 2024 · 0 comments
Open

Update npm package to webpack 5 compatible #975

K1vs opened this issue Jan 28, 2024 · 0 comments
Labels
enhancement 💡 New feature or request

Comments

@K1vs
Copy link

K1vs commented Jan 28, 2024

Hi,
At the moment it is impossible to simply install the package and use in CRA application.
At a minimum, you need to use something like CRACO + node-polyfill-webpack-plugin.
But the worst thing is that even after this the application still does not work due to

bootstrap:27 Uncaught TypeError: util__WEBPACK_IMPORTED_MODULE_0__.TextEncoder is not a constructor
    at ./node_modules/@microsoft/iot-cardboard-js/internal/axios-1bc8e67b.js (formDataToStream.js:8:1)
    at options.factory (react refresh:6:1)
    at __webpack_require__ (bootstrap:24:1)
    at fn (hot module replacement:62:1)
    at ./node_modules/@microsoft/iot-cardboard-js/internal/HierarchyNode-05d12d93.js (ErrorBoundary.tsx:150:1)
    at options.factory (react refresh:6:1)
    at __webpack_require__ (bootstrap:24:1)
    at fn (hot module replacement:62:1)
    at ./node_modules/@microsoft/iot-cardboard-js/internal/ADT3DSceneAdapter-0423f1cf.js (ADT3DGlobe.tsx:150:1)
    at options.factory (react refresh:6:1)

This problem exists even if you use a template
https://github.com/Azure-Samples/cra-template-iot-cardboard-js

@K1vs K1vs added the enhancement 💡 New feature or request label Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 💡 New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant