Comments (14)
Hi @joshmanders, can you try the
v1.5.5-01
prerelease and see how that works for you? Tagged it undernext
in NPM as well, so you can also get it withnpm i @maizzle/cli@next
.Used
resolve-cwd
to try and resolve the framework executable from the current directory, should work fine now.
Yes I will try it later this afternoon when I get back to my desk and report back. Thank you!
from cli.
Sweet!
Will release it next week since I’ll be away for Easter here 👍
from cli.
I can stay on the old version that worked until you release so no worries. Have a happy easter!
from cli.
Published v1.5.5, give it a try and let me know how it goes 👍
https://github.com/maizzle/cli/releases/tag/v1.5.5
from cli.
@cossssmin any input on this? I can submit a PR adding the try catch back... Also you could use require.resolve('@maizzle/framework/package.json')
and that will use the internal module resolver to find the package the same way require('@maizzle/framework')
would. This finding it in monorepos.
This is currently blocking me in production as I can't run my build scripts without editing the index.js file directly.
from cli.
Hey Josh, sorry for the delay, busy times... Yes, please open a PR and we take it from there, thank you!
from cli.
Hey Josh, sorry for the delay, busy times... Yes, please open a PR and we take it from there, thank you!
No worries, big fan of maizzle, thank you for what you've already done. I've opened a PR #200
from cli.
Thanks Josh, released 1.5.3: https://github.com/maizzle/cli/releases/tag/v1.5.3
from cli.
Sorry need to reopen this and revert the change, it's breaking Maizzle right now...
from cli.
Error stack ref:
node:internal/modules/cjs/loader:995
const err = new Error(message);
^
Error: Cannot find module '@maizzle/framework/src'
Require stack:
- F:\DEV\open-source\maizzle\cli\src\index.js
- F:\DEV\open-source\maizzle\cli\bin\maizzle
at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
at Function.resolve (node:internal/modules/cjs/helpers:109:19)
at Command.<anonymous> (F:\DEV\open-source\maizzle\cli\src\index.js:47:42)
at Command.listener [as _actionHandler] (F:\DEV\open-source\maizzle\cli\node_modules\commander\lib\command.js:482:17)
at F:\DEV\open-source\maizzle\cli\node_modules\commander\lib\command.js:1283:65
at Command._chainOrCall (F:\DEV\open-source\maizzle\cli\node_modules\commander\lib\command.js:1177:12)
at Command._parseCommand (F:\DEV\open-source\maizzle\cli\node_modules\commander\lib\command.js:1283:27)
at F:\DEV\open-source\maizzle\cli\node_modules\commander\lib\command.js:1081:27
at Command._chainOrCall (F:\DEV\open-source\maizzle\cli\node_modules\commander\lib\command.js:1177:12)
at Command._dispatchSubcommand (F:\DEV\open-source\maizzle\cli\node_modules\commander\lib\command.js:1077:23) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'F:\\DEV\\open-source\\maizzle\\cli\\src\\index.js',
'F:\\DEV\\open-source\\maizzle\\cli\\bin\\maizzle'
]
}
from cli.
This is an issue when running the Maizzle CLI globally.
So if you have installed it with npm install -g @maizzle/cli
and run maizzle build
in the project root, you'll get an error similar to the one above; Node can't resolve the framework location because it has no way of knowing where it is in a 'global' context.
Running the NPM scripts, like npm run build
, works fine because Node can resolve @maizzle/framework
inside your project.
You can pin @maizzle/cli
to 1.5.3
but for now I have reverted it until we find a solution.
Most probably we'll need a try/catch and fall back to the old way, but I'm open to suggestions :)
from cli.
This is an issue when running the Maizzle CLI globally.
So if you have installed it with
npm install -g @maizzle/cli
and runmaizzle build
in the project root, you'll get an error similar to the one above; Node can't resolve the framework location because it has no way of knowing where it is in a 'global' context.Running the NPM scripts, like
npm run build
, works fine because Node can resolve@maizzle/framework
inside your project.You can pin
@maizzle/cli
to1.5.3
but for now I have reverted it until we find a solution.Most probably we'll need a try/catch and fall back to the old way, but I'm open to suggestions :)
Oh interesting, I haven't ran a cli from global scope in a long time. I'll see if I can come up with a solution but for now pin to 1.5.3.
from cli.
Hi @joshmanders, can you try the v1.5.5-01
prerelease and see how that works for you? Tagged it under next
in NPM as well, so you can also get it with npm i @maizzle/cli@next
.
Used resolve-cwd
to try and resolve the framework executable from the current directory, should work fine now.
from cli.
@cossssmin works perfectly!
from cli.
Related Issues (11)
- Exposing rendering output to string/single file via CLI HOT 2
- `new [repo url]` command fails when missing folder parameter HOT 1
- maizzle cli fails when using es modules HOT 2
- updateNotifier breaking `maizzle build` (--bin, monorepo) HOT 9
- Does not run on macOS HOT 1
- Remove `update-notifier` from dependencies HOT 1
- Git clone with the github url twice HOT 2
- Incompatibiliy with monorepo HOT 4
- Unable to run maizzle serve (cannot find module 'bootstrap') HOT 8
- Unable to use maizzle commands. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.