TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object
See original GitHub issueHello !
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:
- Created 5 years ago
- Reactions:28
- Comments:18
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in 1.1.0. Thanks for all the help!
Hello, I have the same issue as @cvetanov If someone could help us or write an example. That will be great 😄