Closed pmonosolo closed 2 years ago
FYI:
Changed:
"main": "generate-sourcemap.js",
to
"main": "index.js",
And it worked.
{ "name": "generate-sourcemap", "version": "0.1.0", "description": "Generates a source map for files that were packed into a bundle.", "main": "index.js", "scripts": { "test": "node-trap ./test/*.js" }, "repository": { "type": "git", "url": "git://github.com/thlorenz/generate-sourcemap.git" }, "homepage": "https://github.com/thlorenz/generate-sourcemap", "dependencies": { "source-map": "~0.1.9" }, "devDependencies": {}, "keywords": [ "generate", "sourcemap", "bundle", "browser", "generate", "browserify" ], "author": { "name": "Thorsten Lorenz", "email": "thlorenz@gmx.de", "url": "http://thlorenz.com" }, "license": "MIT", "engine": { "node": ">=0.6" } }
I updated my node to V16 and added this to my package.json:
"overrides": {
"magepack": {
"generate-sourcemap": "0.0.2"
}
}
This will force the version of generate-sourcemap where this issue is solved. To fix to completely the dependency in this module should go to the same version.
I am getting this error too, but I am not able to resolve it using the above solution. Can anyone please help? Any help would be appreciated.
Hee @rahulbarot
You tried my solution? Updating node so you can use overrides en then adding the override for that specific package?
Solved my issue
@pmonosolo 's solution worked for me.
Getting an error when trying to run "magepack bundle".
This error happens at the end of the generation sequence:
ℹ Using bundling config from "/home/username/public_html/magepack.config.js". 10:18:20 ℹ Creating bundles for "pub/static/frontend/Vendor/plugin/en_US". 10:18:20 ✔ Generated bundle "common" - 972 kB (273 kB gz). 10:18:28 ✔ Generated bundle "category" - 45 kB (12 kB gz). 10:18:28 ✔ Generated bundle "cms" - 45 kB (12 kB gz). 10:18:29 ✔ Generated bundle "product" - 102 kB (32 kB gz). 10:18:29 ✔ Generated bundle "checkout" - 476 kB (113 kB gz). 10:18:31 ℹ Creating bundles for "pub/static/frontend/Magento/luma/en_US". 10:18:31 ✔ Generated bundle "common" - 972 kB (272 kB gz). 10:18:37 ✔ Generated bundle "category" - 45 kB (12 kB gz). 10:18:37 ✔ Generated bundle "cms" - 45 kB (12 kB gz). 10:18:38 ✔ Generated bundle "product" - 102 kB (32 kB gz). 10:18:38 ✔ Generated bundle "checkout" - 476 kB (113 kB gz). 10:18:40 (node:19981) [DEP0128] DeprecationWarning: Invalid 'main' field in '/usr/local/lib/node_modules/magepack/node_modules/generate-sourcemap/package.json' of 'generate-sourcemap.js'. Please either fix that or report it to the module author
any ideas what could this be?