You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During refactor from react-app-rewired to parcel v2 i encoutered two problems.
First when script in index.html includes type='module' <script type="module" src="./index.tsx"></script>
parcel build works but app crashes with Uncaught TypeError: global is undefined
Whentype='module' is removed app runs but one of packages causes error TypeError: 'fetch' called on an object that does not implement interface Window.
Error: failed to get info about account 7mvq8tBnbgZyfEVxpe2Gbmq8TCx7Xt8sRoqghMpeqvpT: TypeError: 'fetch' called on an object that does not implement interface Window.
getAccountInfo index.ad6fbba7.js:80961
state state.ts:53
getState exchange.js:90
__awaiter exchange.js:8
__awaiter index.ad6fbba7.js:123163
getState exchange.js:89
build exchange.js:54
__awaiter exchange.js:8
__awaiter index.ad6fbba7.js:123163
build exchange.js:52
getExchangeProgram exchange.ts:22
Redux 17
runCallEffect
runEffect
digestEffect
next
proc
runCallEffect
runEffect
digestEffect
next
currCb
end
cont
next
currCb
runCallEffect
runEffect
digestEffect
connection.ts:42:12
💁 Possible Solution
🔦 Context
I want to migrate from webpack to parcel since i use webpack 5 for storybook and
react-scripts does not supports it at this moment.
I have cleared package-lock.json and fixed your error but problem still persist.
This time I was forced to include type=module and encountered another error
@parcel/packager-raw: Raw bundles must only contain one asset
🐛 bug report
During refactor from
react-app-rewired
toparcel
v2 i encoutered two problems.First when
script
in index.html includestype='module'
<script type="module" src="./index.tsx"></script>
parcel build works but app crashes with
Uncaught TypeError: global is undefined
When
type='module'
is removed app runs but one of packages causes errorTypeError: 'fetch' called on an object that does not implement interface Window.
🎛 Configuration (.babelrc, package.json, cli command)
.parcelrc
.package.json
🤔 Expected Behavior
In both cases app should work just fine.
😯 Current Behavior
Error with
type=module
Error without
type=module
💁 Possible Solution
🔦 Context
I want to migrate from webpack to parcel since i use webpack 5 for storybook and
react-scripts does not supports it at this moment.
💻 Code Sample
Here is full repository: https://github.com/Synthetify/synthetify-webapp/tree/parcel
🌍 Your Environment
The text was updated successfully, but these errors were encountered: