-
Notifications
You must be signed in to change notification settings - Fork 105
Closed
Description
I have followed your webpack example and I'm trying to implement this example into a Gatsby app.
During development, when running in the browser, everything is running fine with the config below:
services/dbr.js
/* eslint-disable no-console */
import { BarcodeReader, BarcodeScanner } from "dynamsoft-javascript-barcode";
BarcodeReader.engineResourcePath = "/dbr/"; // Static folder path
// Please visit https://www.dynamsoft.com/customer/license/trialLicense to get a trial license
BarcodeReader.productKeys = process.env.GATSBY_DYNAMSOFT_TRIAL_KEY;
BarcodeScanner.bPlaySoundOnSuccessfulRead = true;
// DBR.BarcodeReader._bUseFullFeature = true; // Control of loading min wasm or full wasm.
export {
BarcodeReader,
BarcodeScanner
}
But when I try to build the app using npm run build = gatsby build, I get the following message:
WebpackError: TypeError: Cannot set property 'engineResourcePath' of undefined on line 4
Any idea what is going wrong here?
My versions:
node: v12.20.0
javascript-barcode: 8.0
gatsby: 2.28.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels