Coder Social home page Coder Social logo

Comments (8)

tknickman avatar tknickman commented on August 21, 2024 2

Could you share a reproduction repo, along with the npm version you're using?

from turborepo.

theogravity avatar theogravity commented on August 21, 2024

Note: I tried also with latest yarn (4.x) and it also doesn't install recursively.

pnpm does work, though, where pnpm install will recursively install once I set up the pnpm-workspace.yaml file.

from turborepo.

anthonyshew avatar anthonyshew commented on August 21, 2024

This sounds like intended behavior. Different package managers install to different locations in Workspaces. The dependencies you're looking for are likely in the node_modules in the root of your repository.

If you start your development server or run a build, do your dependencies resolve? If so, that means your package manager is doing its job correctly and you can close this issue.

from turborepo.

theogravity avatar theogravity commented on August 21, 2024

I have dependencies in my workspace packages that need to be installed. If I try to build my workspace packages like turbo build, it will fail because the deps in the workspace packages aren't installed (their respective package.json files have the deps listed).

I have to manually run yarn install / npm install on each of those package directories for it to work.

The turbo documentation says that running either should install all deps for workspace packages, but it doesn't. It seems to be an issue with npm and yarn respectively instead of turbo based on my research so far, but the turbo docs are incorrect in claiming that it would.

from turborepo.

theogravity avatar theogravity commented on August 21, 2024

Via the document link

You'll now see node_modules folders appear in the root of your repository, and in each workspace.

I only see it in the root, not each workspace package. Exception is pnpm which works as expected.

from turborepo.

GabenGar avatar GabenGar commented on August 21, 2024

@theogravity

I have dependencies in my workspace packages that need to be installed. If I try to build my workspace packages like turbo build, it will fail because the deps in the workspace packages aren't installed (their respective package.json files have the deps listed).

This is quite vague, are you resolving the dependencies manually within workspaces?

from turborepo.

theogravity avatar theogravity commented on August 21, 2024

@theogravity

I have dependencies in my workspace packages that need to be installed. If I try to build my workspace packages like turbo build, it will fail because the deps in the workspace packages aren't installed (their respective package.json files have the deps listed).

This is quite vague, are you resolving the dependencies manually within workspaces?

Running npm / yarn install in the respective dirs.

from turborepo.

mehulkar avatar mehulkar commented on August 21, 2024

@theogravity node_modules appearing in each package or not is up to the package manager, you should consult their docs or open issues there if you're seeing unusual behavior. Based on my experience with package managers, a node_module directory only appearing in the root of the workspace is quite normal (although there are various configurations and versions that might produce different results).

If I try to build my workspace packages like turbo build, it will fail because the deps in the workspace packages aren't installed

this seems like a red herring and unrelated to your npm install based on the info provided. Please provide a reproduction or a the logs from turbo build or something to help further diagnose the problem.

from turborepo.

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.