question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

installations of npm packages is run everytime I try nx g library with directory multi folders deep

See original GitHub issue

Current Behavior

When I run this command:

nx g library mystock --directory=data/stock

It takes 1 minute for NPM packages to install, and everytime I run this command it always goes through installing packages. It does indeed successfully create the project and in the intended data/stock/mystock folder.

Expected Behavior

I expect NPM packages to be installed once and cached. This generator command should be blazing fast not 1 minute slow.

IF I run the same command but the directory is only 1 folder deep, then it does not go through installing NPM packages.

Environment

Windows 10 nx --version 12.0.8 npm -v 6.14.8 Using both nx.json and angular.json (defaultCollection: @nrwl/angular)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
AgentEndercommented, Jun 17, 2021

I would recommend using nx migrate latest to get up to 12.4, it should go pretty smoothly.

0reactions
webmandmancommented, Jun 16, 2021

do I just updated @nrwl packages from 12.0.8 to 12.4.0? or do nx migrate?

Read more comments on GitHub >

github_iconTop Results From Across the Web

The best way to run npm install for nested folders?
Basically, find all package.json files and run npm install in that directory, skipping all node_modules directories.
Read more >
nrwl/nx-plugin
Nx plugins are npm packages that contain generators and executors to extend a Nx ... which would allow you to run nx g...
Read more >
fast-glob - npm
It's a very fast and efficient glob library for Node.js. This package provides methods for traversing the file system and returning pathnames ...
Read more >
How to deploy NPM modules in an NX monorepo and github ...
How do you maintain and deploy multiple NPM modules? ... our independent modules: nx g @nrwl/angular:lib form-association --publishable
Read more >
Configuring Jest
A global setup module configured in a project (using multi-project runner) will be triggered only when you run at least one test from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found