`npx create-maizzle` Cannot find module
MBichurin opened this issue · comments
- Maizzle Version: 0.1.0
- Node.js Version: 21.1.0
My operational system: MacOS Ventura 13.6.4
The create-maizzle
package doesn't work on my MacOS machine. This is the recommended way to install Maizzle (and the only one I found so far).
When I run npx create-maizzle
or npm install -g create-maizzle
it outputs:
node:internal/modules/esm/resolve:255
throw new ERR_MODULE_NOT_FOUND(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/opt/homebrew/lib/node_modules/create-maizzle/src/index.js' imported from /opt/homebrew/lib/node_modules/create-maizzle/bin/create-maizzle.mjs
at finalizeResolution (node:internal/modules/esm/resolve:255:11)
at moduleResolve (node:internal/modules/esm/resolve:908:10)
at defaultResolve (node:internal/modules/esm/resolve:1121:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///opt/homebrew/lib/node_modules/create-maizzle/src/index.js'
}
Here's the output of running ls /opt/homebrew/lib/node_modules/create-maizzle/
:
README.md bin node_modules package.json
As you see, there's no src/
directory, so no wonder create-maizzle.mjs
fails.
What do I do to resolve the issue? Are there alternative ways of installing maizzle
?
Sorry about that, rushed and forgot to include src
under files
in package.json
.
Released v0.2.0
that fixes it, please try again.
As for alternatives, create-maizzle
is just a wizard that downloads a repo and installs dependencies.
You can achieve the same thing manually:
# download the repo
npx degit maizzle/maizzle my-project
# change directory
cd my-project
# install dependencies
npm install
Thanks, the v0.2.0
worked. I can give maizzle
another try now
A suggestion: in case the create-maizzle
doesn't work in the future again, it might be good to mention alternative installation options on the docs. Currently, there's only one option mentioned here, and if it doesn't work, the user is blocked
Added manual setup instructions to the docs: