After installing this npm package from , I followed the instructions by running
npm i zebra-browser-print-wrapper
.
In my standard javascript file, I included the CDN link as shown below:
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="364c535444571b544459414553441b46445f58421b41445746465344760618071802">[email protected]</a>/lib/index.min.js"></script>
Prior to implementing any code with this new package, upon loading the page, I encountered an error in the console:
Uncaught ReferenceError: exports is not defined at index.min.js:7:1461
This specific line triggered the error within the file:
Object.defineProperty(exports, "__esModule", {
The package has been added to my package.json file as seen here:
{
"devDependencies": {
"tailwindcss": "^3.3.5"
},
"scripts": {
"build": "npx tailwindcss -i ./static/css/src/input.css -o ./static/css/styles.css",
"watch": "npx tailwindcss -i ./static/css/src/input.css -o ./static/css/styles.css --watch"
},
"dependencies": {
"flowbite": "^2.4.0",
"zebra-browser-print-wrapper": "^0.1.4". <-------------
}
}
As a novice in the realm of npm, I am uncertain if I have overlooked a fundamental aspect. Any guidance would be appreciated.