Skip to content

Commit

Permalink
Fix ENOENT when running from working directory without package.json (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
s0ph1e committed Oct 9, 2022
1 parent 6c5cfc5 commit f7b5c66
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/config/defaults.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import fs from 'fs';
const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
const defaultRequestUserAgent = `${packageJson.name}/${packageJson.version} (https://github.com/website-scraper/node-website-scraper)`;
const defaultRequestUserAgent = 'website-scraper (https://github.com/website-scraper/node-website-scraper)';

const config = {
defaultFilename: 'index.html',
Expand Down

0 comments on commit f7b5c66

Please sign in to comment.