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
The build passes with parcel build public/index.html
but when I run parcel public/index.html I get the below error:
🚨 Build failed.
@parcel/transformer-js: importScripts() is not supported in module workers.
/Users/jessabyrne/projectrepos/project/node_modules/@loaders.gl/loader-utils/dist/esm/lib/library-utils/library-utils.js:66:12
65 |
> 66 | return "modules/".concat(moduleName, "/src/libs/").concat(library);
> | ^
67 | }
68 |
It seems to get far along but fails near the end. I've tried clearing both the .cache and .parcel-cache as well as removing node_modules and reinstalling.
This happened after making some changes to fix other errors:
changing <script async src="../src/index.tsx" type="text/javascript"></script> to <script async src="../src/index.tsx" type="module"></script>
That would result in broken code. Chrome will throw at runtime on importScripts inside module workers. Parcel is just raising the error at build time. That code should be replaced with a dynamic import() instead.
🐛 bug report
The build passes with
parcel build public/index.html
but when I run
parcel public/index.html
I get the below error:It seems to get far along but fails near the end. I've tried clearing both the
.cache
and.parcel-cache
as well as removingnode_modules
and reinstalling.This happened after making some changes to fix other errors:
changing
<script async src="../src/index.tsx" type="text/javascript"></script>
to<script async src="../src/index.tsx" type="module"></script>
to
🎛 Configuration (.babelrc, package.json, cli command)
package.json
.parcelrc
babel.config.json
🤔 Expected Behavior
task should build
😯 Current Behavior
build fails
💁 Possible Solution
Could be related to this issue: #5021
also perhaps this PR #6531
🌍 Your Environment
The text was updated successfully, but these errors were encountered: