Giter Site home page Giter Site logo

Comments (7)

DominikPieper avatar DominikPieper commented on June 23, 2024 2

@arendjantetteroo I added a option to preserve the node_modules folder

from nx-extensions.

DominikPieper avatar DominikPieper commented on June 23, 2024 1

@arendjantetteroo ah damn. It was to late yesterday ^^'

from nx-extensions.

arendjantetteroo avatar arendjantetteroo commented on June 23, 2024

@DominikPieper i tried on 16.2.1 but i'm probably doing something wrong.

I've got this step in my app/project.json file:

"sync": {
      "executor": "@nxext/capacitor:cap",
      "options": {
        "cmd": "sync",
        "preserveProjectNodeModules": true
      },
      "configurations": {
        "ios": {
          "cmd": "sync ios"
        },
        "android": {
          "cmd": "sync android"
        }
      }
    },

and then run with "app:sync" and still get this output:

[info] Sync finished in 0.249s


Removing node_modules from project root...

Should that option be somewhere else in my config?

from nx-extensions.

arendjantetteroo avatar arendjantetteroo commented on June 23, 2024

@DominikPieper

Looking at the generated js code in my node_modules i see this:

if ((0, fs_1.existsSync)(nodeModulesPath) && preserveProjectNodeModules) {
            try {
                devkit_1.logger.info(`\n\nRemoving node_modules from project root...`);
                (0, fs_1.rmSync)(nodeModulesPath, { recursive: true, force: true });
            }
            catch (err) {
                devkit_1.logger.error(`\n\nFailed to remove node_modules from project root.`);
            }
        }

So if i use preserveNodeModules = false in my project.json, i get the behaviour i expect. But that naming seems inverted?
I would expect preserve = true to keep my node_modules.

from nx-extensions.

arendjantetteroo avatar arendjantetteroo commented on June 23, 2024

@DominikPieper it happens, i'm happy you already got back to this issue so quickly in the first place. :)

from nx-extensions.

DominikPieper avatar DominikPieper commented on June 23, 2024

@arendjantetteroo merged it. I'll do a hotfix release soon. Don't mind the failed run. That's the ionic-react linter tests. I have to fix the linter setup

from nx-extensions.

arendjantetteroo avatar arendjantetteroo commented on June 23, 2024

@DominikPieper thanks, greatly appreciated!

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.