Open Ulyanov-programmer opened 1 year ago
Hey we just updated this, there was a single import inside that we've changed to require the function instead. Try the new version on NPM.
Great! But alas, that's not all. I updated the module and got the following error:
Error: Cannot find module 'globby'
Require stack:
- G:\gulp_multitool\node_modules\posthtml-picture-srcset\lib\inc\rollup-images.js
- G:\gulp_multitool\node_modules\posthtml-picture-srcset\lib\pictureSrcset.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)
at Module._load (node:internal/modules/cjs/loader:885:27)
at Module.require (node:internal/modules/cjs/loader:1105:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (G:\gulp_multitool\node_modules\posthtml-picture-srcset\lib\inc\rollup-images.js:9:14)
at Module._compile (node:internal/modules/cjs/loader:1218:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
at Module.load (node:internal/modules/cjs/loader:1081:32)
at Module._load (node:internal/modules/cjs/loader:922:12)
at Module.require (node:internal/modules/cjs/loader:1105:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'G:\\gulp_multitool\\node_modules\\posthtml-picture-srcset\\lib\\inc\\rollup-images.js',
'G:\\gulp_multitool\\node_modules\\posthtml-picture-srcset\\lib\\pictureSrcset.js'
]
}
I tried reinstalling node_modules, it didn't help.
I have not encountered this :(
An error occurred while trying to import and use your module:
import pictureSrcset from 'posthtml-picture-srcset'
"type": "module",
I think you just forgot to add a
"type": "module",
to your package.json. There was a time when I also made such a mistake.