ExifReader
ExifReader copied to clipboard
Webpack error when attemping to use custom build
Description
I'm just adding exifreader to a personal project. I'm testing doing a custom build to see if it improves the speed of reading data (feel free to tell me it doesn't!).
I've added the below to my package.json
:
"exifreader": {
"include": {
"jpg": true,
"png": true,
"tiff": true,
"heic": true,
"webp": true,
"gif": true,
"file": true,
"png_file": true,
"exif": [
"Model",
"Lens",
"LensModel",
"ExposureTime",
"FNumber",
"FocalLengthIn35mmFilm",
"ISOSpeedRatings",
"DateTimeOriginal",
"CreateDate",
"ModifyDate",
"By-line",
"Copyright Notice",
"Rating",
"GPSDateStamp",
"GPSTimeStamp",
"GPSAltitude",
"Image Width",
"ImageWidth",
"Image Height",
"ImageHeight"
]
}
},
When I run npm install exifreader
I get the following error:
npm ERR! command failed
npm ERR! command sh -c node bin/build.js --only-with-config
npm ERR! CLI for webpack must be installed.
npm ERR! webpack-cli (https://github.com/webpack/webpack-cli)
npm ERR!
npm ERR! We will use "npm" to install the CLI via "npm install -D webpack-cli".
npm ERR! Do you want to install 'webpack-cli' (yes/no): node:child_process:960
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Command failed: npx [email protected]
I've also tried installing the webpack-cli as per the error and that had no effect.
Additional details
- ExifReader version: latest
- Web browser and version:
- Node version: 20
What I expected would happen:
Expect npm install to succeed. It works fine if I remove the custom stuff from my package.json.
What really happened:
NPM install fails.