lerna bootstrap links whole folder, even if files and main are specified
See original GitHub issueExpected Behavior
I’ve tried to exclude the src, test and node_modules folder from the linked package. I’ve tried adding them to a .npmignore file and adding the files to the main
and files
property of the package.json (in each subproject)
package.json includes:
linked package looks like this however:
Current Behavior
Lerna copies the whole folder, including the node_modules, src and test folder
lerna.json
{
"packages": [
"packages/*",
"services/*"
],
"version": "0.0.0",
"npmClient": "npm"
}
lerna-debug.log
Your Environment
Executable | Version |
---|---|
lerna --version |
3.18.1 |
npm --version |
6.9.0 |
yarn --version |
- |
node --version |
10.16.3 |
OS | Version |
---|---|
macOS Catalina | 10.15 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
How To Manage Monorepos With Lerna - DigitalOcean
Run the following command to bootstrap your npm packages from your project root folder: lerna bootstrap.
Read more >node.js - Is there a way to specify different paths for the same ...
You could do this with lerna which is a mono-repository CLI tool. First of all, you would have to define multiple projects within...
Read more >Getting Started | Lerna
To get started with the tutorial, clone this repository. The main branch contains the final setup. If you want to follow along, please...
Read more >A Beginner's Guide to Lerna with Yarn Workspaces | by jsilvax
Let's add yarn as our npmClient and specify that we're using yarn workspaces. For this tutorial we'll be versioning our packages independently.
Read more >Managing Your Typescript Monorepo With Lerna and Codefresh
Several companies have set-up their repositories as Monorepos, ... This will create a Lerna configuration file and a package folder, as well ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cevr I linked to the docs earlier:
I don’t personally use
lerna bootstrap
, so your guess is as good as mine.@UnchartedBull And actually, I don’t quite understand what your problem is? Linking to the directory where the package.json lives with the
"main": "dist/index.js"
is exactly what should be happening (even when transpiling your source). Unless you’re trying to do complicated angular/typescript crap, then yeah,--contents
orpkg.publishConfig.directory
is what you want.