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

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined #1

Open
raitalharehman opened this issue Apr 1, 2019 · 7 comments

Comments

@raitalharehman
Copy link
Contributor

raitalharehman commented Apr 1, 2019

Error while upload file my node version v10.15.2
Error Log

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at assertPath (path.js:39:11)
at Object.join (path.js:432:7)
at app.post (D:\WorkspaceHub\nverter2\server.js:52:32)
at Layer.handle [as handle_request] (D:\WorkspaceHub\nverter2\node_modules\express\lib\router\layer.js:95:5)
at next (D:\WorkspaceHub\nverter2\node_modules\express\lib\router\route.js:137:13)
at Immediate._onImmediate (D:\WorkspaceHub\nverter2\node_modules\multer\lib\make-middleware.js:53:37)
at runCallback (timers.js:706:11)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)

@vrobik
Copy link

vrobik commented May 8, 2019

I had similar errors, but it was because i use localhost:3000 in browser
if you use it like this try to change it to 127.0.0.1:3000 this help me,
probably because of limitation of localhost domain app can't use something, like local storage, cookies or something else i don't debug it 😁

@raitalharehman
Copy link
Contributor Author

i think author has resolved this issue but right know i am facing

xhr.js:178 POST http://localhost:8989/upload 500 (Internal Server Error)
this issue

@Gilb03
Copy link

Gilb03 commented Feb 25, 2020

I am experiencing this issue as well. First thing is that when I run nodemon- and select a file to be uploaded- the file is being uploaded into the appropriate folder, but it is not being transported to the encoding folder. The error I get is the same as the above.

I've updated my dependencies, researched the path syntax, deleted node modules and reinstalled them. I've changed the browser file path to 127.0.0.1:3000 and I still receive the same error. If I restart the server too much I get the upload error, which I know is false because it still loads the file into the upload folder locally.

I'm being forced to look at the syntax of path.join as an issue, but when I adjust that, this does not work either. Is there any recourse for my issue?
Screen Shot 2020-02-24 at 6 59 23 PM

@waleedahmad
Copy link
Owner

I am experiencing this issue as well. First thing is that when I run nodemon- and select a file to be uploaded- the file is being uploaded into the appropriate folder, but it is not being transported to the encoding folder. The error I get is the same as the above.

I've updated my dependencies, researched the path syntax, deleted node modules and reinstalled them. I've changed the browser file path to 127.0.0.1:3000 and I still receive the same error. If I restart the server too much I get the upload error, which I know is false because it still loads the file into the upload folder locally.

I'm being forced to look at the syntax of path.join as an issue, but when I adjust that, this does not work either. Is there any recourse for my issue?
Screen Shot 2020-02-24 at 6 59 23 PM

Node version?
OS?

@Gilb03
Copy link

Gilb03 commented Mar 3, 2020

My OS version is Mac Catalina 10.15.3 and my Node version is 11.3.0 @waleedahmad

@kusaasira
Copy link

Any work arounds for this till now?

@topninja
Copy link

any progress yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants