Cannot find module (10.0.0)
meezwhite opened this issue ยท 2 comments
meezwhite commented
Usage from package.json
scripts:
"scripts": {
"build": "minify index.js > index.min.js"
}
npm run build
Content of index.min.js
:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/node_modules/@putout/minify/bundle/minify.js' imported from /node_modules/minify/lib/js.js
at new NodeError (node:internal/errors:399:5)
at finalizeResolution (node:internal/modules/esm/resolve:326:11)
at moduleResolve (node:internal/modules/esm/resolve:945:10)
at defaultResolve (node:internal/modules/esm/resolve:1153:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
at link (node:internal/modules/esm/module_job:76:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
Also, adding --js
hangs the script execution, no errors thrown.
minify.js
isn't present inside /node_modules/@putout/minify/bundle/
, but minify.min.js
on the other hand is.
coderaiser commented
Thank you! Fixed with @putout/minify@1.3.1
๐ .
Please re-install Minify.
Is it works for you?
meezwhite commented
Great thanks! Seems to be working now!