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.

TypeError The "path" argument must be of type string. Received type undefined

See original GitHub issue

Node Version: 10.14.2

Uncaught Exception:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at assertPath (path.js:39:11)
    at dirname (path.js:1268:5)
    at Function.getRoot (webpack:///./node_modules/bindings/bindings.js?:154:13)
    at bindings (webpack:///./node_modules/bindings/bindings.js?:60:32)
    at eval (webpack:///./node_modules/level/node_modules/leveldown/leveldown.js?:4:101)
    at Object../node_modules/level/node_modules/leveldown/leveldown.js (/Users/XXX/dist_electron/index.js:1386:1)
    at __webpack_require__ (/Users/alecyrus/Documents/Code/RealWork/Vaquita/dist_electron/index.js:20:30)
    at eval (webpack:///./node_modules/level/level.js?:1:111)
    at Object../node_modules/level/level.js (/Users/XXX/dist_electron/index.js:1353:1)
    at __webpack_require__ (/Users/XXXdist_electron/index.js:20:30)

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
Alecyruscommented, Jan 26, 2019

Solved, So nice!!! @vweevers you are right. It can’t find the native module. But I should set external in electron builder rather than webpack config.

// vue.config.js
module.exports = {
  configureWebpack: {
  },
  pluginOptions: {
    electronBuilder: {
      externals: ['level'],
    },
  },
};
1reaction
lcc91commented, Feb 16, 2019

I has been stuck for 2 days. After I saw this thread, I solved the problem! Remind who came this thread, I’m using https://github.com/pouchdb/pouchdb which also depend on “leveldown”. And, solve by adding this in webpack config externals: { leveldown: 'leveldown', },

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 run yarn start I get...
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 ... - GitHub
Converts JSON schema to MD. Actual Behaviour. The following error is thrown: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of ...
Read more >
the "path" argument must be of type string. received ... - You.com
i tried working with fs.unlink too in my server.js file but I cannot understand the error. One more thing just posting texts request...
Read more >
The "path" argument must be of type string. Received type ...
[Solved]-TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined-Reactjs ... If you have react-scripts@3.4.0 already ...
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