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 [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object

See original GitHub issue

Hello !

I tried to prerender my preact application but I get this error. If I remove prerender-loader and just put the path to my index.html I don’t get any error. Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object

I’m using html-webpack-plugin like so :

new htmlWebpackPlugin({
  // prerendering with prerender-loader
  template: `!!prerender-loader?string!${path.resolve(__dirname, '../src/index.html')}`,
  minify: {
    removeComments: true
  },
  cache: true,
  // make it work consistently with multiple chunks
  chunksSortMode: 'dependency'
})

Thanks for the help ! 😃

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:28
  • Comments:18

github_iconTop GitHub Comments

3reactions
developitcommented, Sep 4, 2018

Fixed in 1.1.0. Thanks for all the help!

2reactions
tizanocommented, Jun 1, 2018

Hello, I have the same issue as @cvetanov If someone could help us or write an example. That will be great 😄

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 - Reactgo
In this tutorial, we are going to learn about how to fix the TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string....
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 >
The "path" argument must be of type string. Received ... - GitHub
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type boolean (true) #8331.
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