You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So , module-alias works pretty well when using it in a dev enviroment when used like this in package.json : node -r esm -r module-alias/register index.js .
but as soon as i want to generate a bin
eg : "bin": { "express-cli": "./index.js" },
i get an error when trying to execute the command specifying that it can't find my packages :
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'classes' imported from /home/chadist/Desktop/express-gen/index.js at new NodeError (node:internal/errors:371:5) at packageResolve (node:internal/modules/esm/resolve:845:9) at moduleResolve (node:internal/modules/esm/resolve:890:18) at Loader.defaultResolve [as _resolve] (node:internal/modules/esm/resolve:1004:11) at Loader.resolve (node:internal/modules/esm/loader:89:40) at Loader.getModuleJob (node:internal/modules/esm/loader:242:28) at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40) at link (node:internal/modules/esm/module_job:75:36) { code: 'ERR_MODULE_NOT_FOUND' }
any idea how can i load the script when executing the command?
The text was updated successfully, but these errors were encountered:
So , module-alias works pretty well when using it in a dev enviroment when used like this in package.json :
node -r esm -r module-alias/register index.js
.but as soon as i want to generate a bin
eg :
"bin": { "express-cli": "./index.js" },
i get an error when trying to execute the command specifying that it can't find my packages :
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'classes' imported from /home/chadist/Desktop/express-gen/index.js at new NodeError (node:internal/errors:371:5) at packageResolve (node:internal/modules/esm/resolve:845:9) at moduleResolve (node:internal/modules/esm/resolve:890:18) at Loader.defaultResolve [as _resolve] (node:internal/modules/esm/resolve:1004:11) at Loader.resolve (node:internal/modules/esm/loader:89:40) at Loader.getModuleJob (node:internal/modules/esm/loader:242:28) at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40) at link (node:internal/modules/esm/module_job:75:36) { code: 'ERR_MODULE_NOT_FOUND' }
any idea how can i load the script when executing the command?
The text was updated successfully, but these errors were encountered: