Giter Site home page Giter Site logo

Comments (6)

DominikPieper avatar DominikPieper commented on September 24, 2024

Hey, which workspace scheme do you use?

from nx-extensions.

codemis avatar codemis commented on September 24, 2024

Thank you @DominikPieper for your quick reply. I am going to close this issue. I think I may have had an older library on my computer that was causing the problem. I walked through the steps again, and everything worked perfectly this time. 🤷‍♂️ Thank you for your time and your hard work!

from nx-extensions.

dasco144 avatar dasco144 commented on September 24, 2024

I was able to get the same thing on a repo of mine at this commit when running the nx g @nxext/ionic-angular:application yoga-schedule command

Edit: Looking a bit further, it seems that the npmScope it tries to infer from the getNpmScope nx helper function is returning undefined.

Edit 2: I think the issue comes from this line, where the getNpmScope nx util for getting the scope name is looking for a name starting with @, and not returning anything for other scenarios (which is my case).

More info here behind the decision to not support scopes without a starting @

from nx-extensions.

andregreeff avatar andregreeff commented on September 24, 2024

I'm experiencing this same issue with a completely new project now, never seen it before though.

at first, npx create-nx-workspace template-mobile-workspace was creating a new workspace for me with Nx 15, but I did find that nx@15 was still installed globally. updated this with npm i -g nx, and now nx --version shows the global version as 16.7.4.

npx create-nx-workspace was still generating a new workspace with nx@15 though, which I only managed to get around by running npx create-nx-workspace@latest. after this, nx --version showed the local version as 16.7.4 as well.

thereafter I ran npm i -D @nxext/ionic-angular @nxext/capacitor, which installed version 16.2.0 of the Angular plugin and 16.7.0 of the Capacitor plugin.

at this point, nx g @nxext/ionic-angular:app base (choosing "tabs" template) generates the files which Prettier then cannot format, because:

Could not format packages/base/src/index.html. Error: "Unexpected closing tag "-root". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (23:10)
  21 |
  22 | <body>
> 23 |   <-root></-root>
     |          ^^^^^^^^
  24 | </body>
  25 |
  26 | </html>"
Could not format packages/base/src/app/tab1/tab1.page.html. Error: "Unexpected closing tag "-explore-container". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (16:41)
  14 |   </ion-header>
  15 |
> 16 |   <-explore-container name="Tab 1 page"></-explore-container>
     |                                         ^^^^^^^^^^^^^^^^^^^^^
  17 | </ion-content>
  18 |"
Could not format packages/base/src/app/tab2/tab2.page.html. Error: "Unexpected closing tag "-explore-container". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (16:41)
  14 |   </ion-header>
  15 |
> 16 |   <-explore-container name="Tab 2 page"></-explore-container>
     |                                         ^^^^^^^^^^^^^^^^^^^^^
  17 | </ion-content>
  18 |"
Could not format packages/base/src/app/tab3/tab3.page.html. Error: "Unexpected closing tag "-explore-container". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (16:41)
  14 |   </ion-header>
  15 |
> 16 |   <-explore-container name="Tab 3 page"></-explore-container>
     |                                         ^^^^^^^^^^^^^^^^^^^^^
  17 | </ion-content>
  18 |"

this is the only place I've found anybody else experiencing the same issue, and it's for older versions.. is this perhaps something going wrong in my dev environment then?

from nx-extensions.

andregreeff avatar andregreeff commented on September 24, 2024

ok, interesting... I just tried this again, but slightly differently:

  • started with npx create-nx-workspace@latest, as before.
  • in the workspace, npm i -D @nxext/ionic-angular, without explicitly adding @nxext/capacitor as well.
  • then npx nx g @nxext/ionic-angular:app base, and it's just finished installing dependencies... no errors.

I did uninstall my global nx package, just incase.. which is why I needed npx for the final command this time. not sure if that has any bearing here? FWIW, npx nx --version shows local as 16.7.4, and no global, which is correct.

from nx-extensions.

andregreeff avatar andregreeff commented on September 24, 2024

figured it out.. the "structure" selection (or the "schema" that @DominikPieper mentioned?) in the workspace that works as expected used "integrated monorepo", whereas the first workspace that has this issue used "packages".

from nx-extensions.

Related Issues (20)

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.