-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERR_INVALID_ARG_TYPE error while trying single run #5
Comments
Same error with
> npx unlighthouse --site unlighthouse.dev --debug
» Starting Unlighthouse at root: ---
» Discovered config definition { unlighthouse 19:51:48
config: undefined,
sources: []
}
» Post config resolution { unlighthouse 19:51:48
routerPrefix: '',
apiPrefix: '/api',
cache: true,
client: {
groupRoutesKey: 'route.definition.name',
columns: {
overview: [Array],
performance: [Array],
accessibility: [Array],
'best-practices': [Array],
seo: [Array]
}
},
scanner: {
customSampling: {},
ignoreI18nPages: true,
maxRoutes: 200,
skipJavascript: true,
samples: 1,
throttle: false,
crawler: true,
dynamicSampling: 5,
sitemap: true,
device: 'mobile'
},
server: {
port: 5678,
showURL: false,
open: true
},
discovery: {
supportedExtensions: [
'vue',
'md'
],
pagesDir: 'pages'
},
root: '-',
outputPath: '.lighthouse',
debug: true,
puppeteerOptions: {
executablePath: '-'
},
puppeteerClusterOptions: {
monitor: true,
workerCreationDelay: 500,
retryLimit: 3,
timeout: 300000,
maxConcurrency: 12,
skipDuplicateUrls: false,
retryDelay: 2000,
concurrency: 3,
puppeteer: PuppeteerNode {
_changedProduct: false,
_isPuppeteerCore: true,
_projectRoot: '\nvm\\v16.6.0\\node_modules\\unlighthouse\\node_modules\\puppeteer-core',
__productName: undefined,
_preferredRevision: '961656'
}
},
lighthouseOptions: {
onlyCategories: [
'performance',
'accessibility',
'best-practices',
'seo'
],
throttlingMethod: 'provided',
throttling: {
rttMs: 0,
throughputKbps: 0,
cpuSlowdownMultiplier: 1,
requestLatencyMs: 0,
downloadThroughputKbps: 0,
uploadThroughputKbps: 0
},
formFactor: 'mobile',
screenEmulation: {
mobile: true
}
},
urls: [],
site: 'https://unlighthouse.dev/',
hooks: {
'resolved-config': [AsyncFunction: resolved-config]
}
}
» Testing Site https://unlighthouse.dev/ is valid. unlighthouse 19:51:48
√ Successfully connected to https://unlighthouse.dev/, status code: 200. unlighthouse 19:51:48
» Creating Unlighthouse unlighthouse 19:51:48
» Setting Unlighthouse Site URL [Site: https://unlighthouse.dev/] unlighthouse 19:51:48
» Setting Unlighthouse Server Context [Server: https://localhost:5678/] unlighthouse 19:51:48
» Using preset: @unrouted/[email protected] unlighthouse-api 19:51:48
» Using plugin: laravelNamedParams unlighthouse-api 19:51:48
» Registering route GET /__lighthouse. unlighthouse-api 19:51:48
» Registering route POST /api/reports/rescan. unlighthouse-api 19:51:48
» Registering route GET,HEAD /api/reports/:id/lighthouse. unlighthouse-api 19:51:48
» Registering route GET,HEAD /api/reports/:id/full-page-screenshot. unlighthouse-api 19:51:48
» Registering route POST /api/reports/:id/rescan. unlighthouse-api 19:51:48
» Registering route GET,HEAD /api/__launch. unlighthouse-api 19:51:48
» Registering route GET,HEAD /api/ws. unlighthouse-api 19:51:48
» Registering route GET,HEAD /api/reports. unlighthouse-api 19:51:48
» Registering route GET,HEAD /api/reports/:id. unlighthouse-api 19:51:48
» Registering route GET,HEAD /api/scan-meta. unlighthouse-api 19:51:48
» Registering route GET /**. unlighthouse-api 19:51:48
» Registering route GET /. unlighthouse-api 19:51:48
» Setting up 12 routes. unlighthouse-api 19:51:48
node:internal/errors:464
ErrorCaptureStackTrace(err);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
|
Hey @bux & @thomasbnt Thanks for reporting this issue. Looks like it was a bug with Windows. I've pushed up a fix and it seems to be working. Would you mind trying again with the command
or
|
@harlan-zw Yeah, that looks good. Thank you for the fast fix :) |
I just got the same issue today, trying it out. I run on a mac.
|
Same here, I tired node 16/18/20 , npx/pnpx and nothing works |
This line is failing and needs a try catch and type check around it. I changed it like this and it works.
|
OS: Windows 10
node js: v16.13.2
I'm getting the following error when trying
pnpm dlx unlighthouse --site https://unlighthouse.dev/guide/
The text was updated successfully, but these errors were encountered: