question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object

See original GitHub issue
> netlify deploy
Deploy path:        D:\xampp\htdocs\netlify_sandbox\dist
Functions path:     D:\xampp\htdocs\netlify_sandbox\functions
Configuration path: D:\xampp\htdocs\netlify_sandbox\netlify.toml
Deploying to draft URL...
- Hashing files...
 »   Warning:
 »   {}
 »
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object
    at filesForFunctionZip (C:/Users/david/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/@netlify/zip-it-and-ship-it/src/zip.js:38:22)
    at zipJs (C:/Users/david/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/@netlify/zip-it-and-ship-it/src/zip.js:110:3)
    at zipFunction (C:/Users/david/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/@netlify/zip-it-and-ship-it/src/zip.js:143:12)
    at C:/Users/david/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/@netlify/zip-it-and-ship-it/src/zip.js:181:9
    at element (C:/Users/david/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/p-all/index.js:4:67)
    at Promise.resolve.then.element (C:/Users/david/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/p-map/index.js:47:21)

specs

windows 10

> node -v
v11.1.0
> npm -v
6.4.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
olescommented, Mar 10, 2020

@bcomnes I have no words. I had the same error.

I tried so many different things. Was about to give up, after I saw this, and as a last resort, copied a random package.json to my project root.

It worked.

I’m running version 2.37.0 of the cli.

I need a break.

0reactions
bcomnescommented, Apr 22, 2019

Fixed in netlify-cli@2.11.12.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The "path" argument must be of type string ... - Stack Overflow
I'm working on a project in React and ran into a problem that has me stumped. Whenever I ...
Read more >
[Fix] TypeError [ERR_INVALID_ARG_TYPE]: The “path ...
Have you run into the error “TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received undefined”? In this story I'll go...
Read more >
The "path" argument must be of type string. Received - YouTube
JavaScript : TypeError [ERR_INVALID_ARG_TYPE]: The " path " argument must be of type string. Received type undefined raised when starting ...
Read more >
Why I got TypeError [ERR_INVALID_ARG_TYPE]: The "path ...
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null at new NodeError (node:internal/errors:278:15) ...
Read more >
typeerror [err_invalid_arg_type]: the "file" argument must be of ...
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object. Asked May 28, 2020 • 1 votes 1...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found