Giter VIP home page Giter VIP logo

Comments (14)

joshmanders avatar joshmanders commented on September 28, 2024 1

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.

Yes I will try it later this afternoon when I get back to my desk and report back. Thank you!

from cli.

cossssmin avatar cossssmin commented on September 28, 2024 1

Sweet!

Will release it next week since I’ll be away for Easter here 👍

from cli.

joshmanders avatar joshmanders commented on September 28, 2024 1

I can stay on the old version that worked until you release so no worries. Have a happy easter!

from cli.

cossssmin avatar cossssmin commented on September 28, 2024 1

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.

joshmanders avatar joshmanders commented on September 28, 2024

@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.

cossssmin avatar cossssmin commented on September 28, 2024

Hey Josh, sorry for the delay, busy times... Yes, please open a PR and we take it from there, thank you!

from cli.

joshmanders avatar joshmanders commented on September 28, 2024

@cossssmin

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.

cossssmin avatar cossssmin commented on September 28, 2024

Thanks Josh, released 1.5.3: https://github.com/maizzle/cli/releases/tag/v1.5.3

from cli.

cossssmin avatar cossssmin commented on September 28, 2024

Sorry need to reopen this and revert the change, it's breaking Maizzle right now...

from cli.

cossssmin avatar cossssmin commented on September 28, 2024

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.

cossssmin avatar cossssmin commented on September 28, 2024

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.

joshmanders avatar joshmanders commented on September 28, 2024

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 :)

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.

cossssmin avatar cossssmin commented on September 28, 2024

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.

joshmanders avatar joshmanders commented on September 28, 2024

@cossssmin works perfectly!

from cli.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.