diff --git a/programming/javascript/user-guide/mrz-scanner-v2.2.3000.md b/programming/javascript/user-guide/mrz-scanner-v2.2.3000.md index 72a171f..7ed3c65 100644 --- a/programming/javascript/user-guide/mrz-scanner-v2.2.3000.md +++ b/programming/javascript/user-guide/mrz-scanner-v2.2.3000.md @@ -217,7 +217,9 @@ npm i dynamsoft-image-processing@2.2.30 -E The resources are located at the path node_modules/, without @, so the script in your page would be like: +```html +``` Since @ is missing, you need to specify the location of the "engine" files: diff --git a/programming/javascript/user-guide/mrz-scanner.md b/programming/javascript/user-guide/mrz-scanner.md index b59de54..09202c8 100644 --- a/programming/javascript/user-guide/mrz-scanner.md +++ b/programming/javascript/user-guide/mrz-scanner.md @@ -251,11 +251,14 @@ npm i dynamsoft-capture-vision-std@1.4.10 -E npm i dynamsoft-image-processing@2.4.20 -E ``` -The resources are located at the path node_modules/, without @, so the script in your page would be like: +The resources are located at the path `node_modules/`, without `@`. You must copy "dynamsoft-xxx" packages elsewhere and add `@`. The `` can be obtained from `package.json` of each package. You can typically include SDK like this: - +```html + +``` -Since @ is missing, you need to specify the location of the "engine" files: +Another thing to do is to specify the `engineResourcePaths` so that the SDK can correctly locate the resources. + > Since "node_modules" is reserved for Node.js dependencies, and in our case the package is used only as static resources, we recommend either renaming the "node_modules" folder or moving the "dynamsoft-" packages to a dedicated folder for static resources in your project to facilitate self-hosting. ```javascript //The following code uses the jsDelivr CDN as an example, feel free to change it to your own location of these files