Comments (21)
I'm having the same issue with Nuxt v2.15.8
TypeError: _mux_upchunk__WEBPACK_IMPORTED_MODULE_16__.createUpload is not a function
It happened to me with version 2.3.0, 2.3.1 and 2.6.0
from upchunk.
hey, can someone post exactly how they're using UpChunk?
Locally, I tried the following and can get a not a function
error in only one of the cases with upchunk 2.3.1 and 2.6.0 using webpack 5 and webpack 4:
import { createUpload } from '@mux/upchunk';
console.log(createUpload) // createUpload
import * as UpChunk from '@mux/upchunk';
console.log(UpChunk.createUpload) // createUpload
import { UpChunk, createUpload } from '@mux/upchunk';
console.log(UpChunk.createUpload) // nothing
console.log(createUpload) // createUpload
from upchunk.
In my environment, I had to change:
import * as UpChunk from '@mux/upchunk'
to
import * as UpChunk from '@mux/upchunk/dist/upchunk.mjs'
from upchunk.
import * as UpChunk from '@mux/upchunk/dist/upchunk.mjs' as suggested by @andrewcmyk resolved my issue.
from upchunk.
@AdamBCo can you share the code you're using to import upchunk?
from upchunk.
I can confirm I was having the same issue. I was using typescript and was getting this error:
TypeError: _mux_upchunk__WEBPACK_IMPORTED_MODULE_2__.createUpload is not a function
Downgrading to upchunk version 2.3.1 fixed the issue for me.
from upchunk.
@dylanjha The code I was using is identical to what's posted in the example.
@danya3781 Your downgrade suggestion worked. Thank you 🙏🙏
from upchunk.
What version of webpack are you using? Anything special in the configuration?
I'm going to assume that it likely broke with #84
from upchunk.
We also experienced this same issue. We're on an older version of react-scripts
(3.x) webpack
(4.2.x).
Downgrading like @danya3781 suggested worked for now, but it would be nice to do that.
from upchunk.
@gkatsev I tried all your ways and it all gave the same error.
from upchunk.
@troyer are you able to make a small test case repo for me to reproduce? So far I've been unable 🙁
from upchunk.
Getting a similar issue with 2.6.0 and Webpack 4.44.2
_mux_upchunk__WEBPACK_IMPORTED_MODULE_10___default.a.createUpload is not a function
Update:
The same issue persists with 2.3.1
Update 2:
Was able to get it to work by downgrading to 2.5.0 but would be nice if this issue could be resolved.
from upchunk.
Encountering the same issue.
We are trying to use it with Vue 2.x to no avail. Using web pack 4.x. I've tried the versions listed here, all to no avail.
from upchunk.
Anyone able to set up a test project on codesandbox or a github repo that showcases this error? Unfortunately, in all my testing, I haven't been able to reproduce it.
from upchunk.
The most frustrating part is that my build is successful.
It is only after the build, when you are trying to upload something, does it actually fail.
Workaround for now: just importing the script using <script src="https://unpkg.com/@mux/upchunk@2"></script>
.
A demo sandbox would take me some time to put together...
from upchunk.
UpChunk is throwing exception when I try to upload a video with a signed URL. I am using React 17.x and Upchunk 3.x
Uncaught (in promise) TypeError: mux_upchunk__WEBPACK_IMPORTED_MODULE_23_.createUpload is not a function
at ReviewVideoUpload.js:1719:1
(anonymous) @ ReviewVideoUpload.js:1719
await in (anonymous) (async)
(anonymous) @ ReviewVideoUpload.js:1678
callCallback @ react-dom.development.js:3919
invokeGuardedCallbackDev @ react-dom.development.js:3968
invokeGuardedCallback @ react-dom.development.js:4028
Code Snippet:
console.log(">>>In uploadFiles(): muxSignedUrl is: ", muxSignedUrl);
if (file && !lodash.isEmpty(muxSignedUrl)) {
const upload = UpChunk.createUpload({
endpoint: muxSignedUrl,
file: file,
chunkSize: 30720, // Uploads the file in ~30 MB chunks
});
.......
}
from upchunk.
@onyii5119 if you could share a test project to reproduce your issue (a codesandbox, a simple public github repo, etc.), that would help us identify a root cause of your problem.
from upchunk.
@onyii5119 if you could share a test project to reproduce your issue (a codesandbox, a simple public github repo, etc.), that would help us identify a root cause of your problem.
Thank you. My issue is resolved.
from upchunk.
Seems to be an issue when using webpack 4 - I updated mine to be:
import { createUpload } from '@mux/upchunk/dist/upchunk';
As I was getting unit test & typescript issues when using
import * as UpChunk from '@mux/upchunk/dist/upchunk.mjs'
from upchunk.
Hey Folks! We may have an improvement for some (maybe all? 🤞) of the build tools mentioned here. If anyone wants to give it a try, update to @mux/[email protected]
and re-try doing your import like this:
import { createUpload } from '@mux/upchunk';
If you do try, let me know either way whether or not it works now.
from upchunk.
Gonna close this as we confirmed the 3.3.0 fix in the tools that we were able to repro this in. If you're still experiencing this with your tooling please let us know. Thank you all for the reports along the way!
from upchunk.
Related Issues (20)
- Possibility to use content-type Form Data HOT 2
- Multiple uploads HOT 4
- Error 501 - not implemented, when trying to upload to AWS S3 bucket via pre-signed URL HOT 2
- Error on deployed Next.js website HOT 9
- I am try to resume upload, but it seems it restart again but no resume. HOT 3
- The video asset get auto deleted after 24 hours? HOT 1
- parallel upload of chunks HOT 2
- Progress event arguments bug HOT 9
- Uploading large files on mobile browsers fails HOT 1
- Retrieving Asset ID after upchunk finishes an upload? HOT 2
- [Bug] Failure to Handle 'Range' Response Header in Chunked Uploads to GCS HOT 2
- [Feature Request] Response object inside the 'error' event HOT 2
- How to pass additional data with request HOT 5
- TypeError: Cannot read properties of null (reading 'includes') HOT 1
- Upload of large files 4GB+ fails on Safari. UpChunk or WebKit problem? HOT 9
- TypeError occurred using a Japanese file name HOT 9
- Failed chunk upload callback response is undefined error HOT 1
- returning the asset ID on success HOT 1
- GCS chunked request overwrites existing file instead of appending to it HOT 2
- WebKit: in-memory FileReader failover, invalid Content-Range header. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from upchunk.