yarn-workspaces

How to use yarn workspaces with typescript and out folders?

僤鯓⒐⒋嵵緔 提交于 2020-02-27 22:30:04
问题 I'm trying to set up a monorepo using yarn. I'm confused as to how to set up typescript with project references such that things resolve properly. For example, if I have a folder structure like /cmd /client And I want cmd to depend on client I could have: cmd/tsconfig.json : { "compilerOptions": { "types": ["reflect-metadata", "jest"], "experimentalDecorators": true, "emitDecoratorMetadata": true, "moduleResolution": "node", "declaration": true, "importHelpers": true, "composite": true,

Export multiple modules from NPM package

折月煮酒 提交于 2019-12-24 19:48:08
问题 I have a rather large project A using Node and Typescript. In project A I have a lot of different modules that I would like to reuse in another project B. Therefore I have built the project A with this tsconfig.json: { "compilerOptions": { "target": "es2017", "module": "commonjs", "declaration": true, "outDir": "./dist", "sourceMap": true, "strict": true, "noImplicitAny": true, "strictNullChecks": true, "typeRoots": ["./node_modules/@types", "./modules/@types"] }, "exclude": ["node_modules"]

Are there any advantages to using Lerna with Yarn workspaces?

不羁的心 提交于 2019-12-21 04:09:33
问题 We're in the process of migrating our monorepo to use Lerna. Lerna supports both NPM and Yarn and furthermore allows configuration of use with Yarn workspaces. It's unclear to me whether Lerna with Yarn workspaces has any distinct advantages to Lerna with NPM. Many posts claim that Lerna does more or less the same thing as Yarn workspaces out of the box. Are there any advantages to using Lerna with Yarn workspaces opposed to Lerna with NPM? 回答1: As far as I know, NPM doesn't have any

Yarn Workspaces and Browserify - package.json in subfolder breaks the build

僤鯓⒐⒋嵵緔 提交于 2019-12-08 16:37:31
问题 My ultimate goal is to use Yarn Workspaces in a project using Browserify and Babel 7. This is a minimal reproduction of a problem I'm having. Basically it seems that the presence of a package.json file in a subfolder (which is one of the things that you have when using Yarn Workspaces) breaks my Browserify build, and I can't figure out why. Here's a GitHub repo with a minimal reproduction of the problem. First, install the dependencies (you can use yarn or npm, doesn't matter): $ npm install

AWS CodeBuild does not work with Yarn Workspaces

本小妞迷上赌 提交于 2019-12-07 14:45:52
问题 I'm using Yarn Workspaces in my repository and also using AWS CodeBuild to build my packages. When build starts, CodeBuild takes 60 seconds to install all packages and I'd want to avoid this time caching node_modules folder. When I add: cache: paths: - 'node_modules/**/*' to my buildspec file and enable LOCAL_CUSTOM_CACHE , I receive this error: error An unexpected error occurred: "EEXIST: file already exists, mkdir '/codebuild/output/src637134264/src/git-codecommit.us-east-2.amazonaws.com/v1

AWS CodeBuild does not work with Yarn Workspaces

走远了吗. 提交于 2019-12-05 21:26:11
I'm using Yarn Workspaces in my repository and also using AWS CodeBuild to build my packages. When build starts, CodeBuild takes 60 seconds to install all packages and I'd want to avoid this time caching node_modules folder. When I add: cache: paths: - 'node_modules/**/*' to my buildspec file and enable LOCAL_CUSTOM_CACHE , I receive this error: error An unexpected error occurred: "EEXIST: file already exists, mkdir '/codebuild/output/src637134264/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/MY_REPOSITORY/node_modules/@packages/configs'". Is there a way to remove this error configuring