"Bad argument" error when trying to use the plugin.
See original GitHub issuevar err = this._handle.spawn(options);
^
TypeError: Bad argument
at TypeError (native)
at ChildProcess.spawn (internal/child_process.js:289:26)
at exports.spawn (child_process.js:380:9)
at Object.exports.execFile (child_process.js:143:15)
at capturePage (/Users/yifengwu/Desktop/dev/lava-official/node_modules/prerender-spa-plugin/lib/compile-to-html.js:70:26)
at /Users/yifengwu/Desktop/dev/lava-official/node_modules/prerender-spa-plugin/lib/compile-to-html.js:88:11
at _invoke (/Users/yifengwu/Desktop/dev/lava-official/node_modules/hapi/lib/server.js:305:20)
at internals.Server._invoke (/Users/yifengwu/Desktop/dev/lava-official/node_modules/hapi/lib/server.js:375:16)
at Items.serial (/Users/yifengwu/Desktop/dev/lava-official/node_modules/hapi/lib/server.js:297:14)
at done (/Users/yifengwu/Desktop/dev/lava-official/node_modules/hapi/node_modules/items/lib/index.js:31:25)
at Server.finalize (/Users/yifengwu/Desktop/dev/lava-official/node_modules/hapi/lib/connection.js:171:9)
at Server.g (events.js:291:16)
at emitNone (events.js:91:20)
at Server.emit (events.js:185:7)
at emitListeningNT (net.js:1278:10)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
I’m using this plugin with vue-cli webpack template. And here is the code I added in webpack.prod.conf.js:
new PrerenderSpaPlugin(
path.join(__dirname, '../dist'),
['/']
)
The first argument is the root of the built files which has the following file structure:
/dist
|--- index.html
|--- /static
|--- /js
|--- /css
|--- /img
Also I came across the same error in the example you provide. I tried in Node v6.7.0 & v4.6.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
invalid argument error in plugin - Microsoft Dynamics CRM ...
Incorrect type of attribute value System. Int32 -> this error message usually comes from the incorrect data type that set into the attribute....
Read more >Getting error of invalid argument after plugin activated
Getting the following error after activating the plugin. And is not able to do any settings in the plugin. Warning: Invalid argument supplied...
Read more >runtime error: /usr/local/openresty/lualib/resty/core/request.lua ...
bug: runtime error: /usr/local/openresty/lualib/resty/core/request.lua:116: bad argument #1 to 'lower' (string expected, got nil) #7276.
Read more >Do you get a bad argument error on max? : r/neovim - Reddit
Hi guys, I recently updated nvim to version 0.8.0 and this error started popping up. I tried looking for a cause and how...
Read more >Bad argument provided error - Mocha Pro - Boris FX Forum
When I launch the UI I'm getting a Bad argument provided error and them ... Try using proxies in Nuke, you don't need...
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 Free
Top 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
It sounds like phantomjs didn’t get installed correctly for whatever reason. You can try to install it again with:
I’ve had the same error and just
npm rebuild
command helped me! For some reason, npm reinstalling did not help…