yarnpkg

Passing Redux store in props

房东的猫 提交于 2019-12-05 09:18:44
I'm doing an University practice building an app using React and Redux. When I start the server using Yarn, I get this error: Passing redux store in props has been removed and does not do anything. To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React-Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect My files are these: index.js import React from 'react'; import

No package found with specified pattern: D:\\a\\r1\\a\\**\\*.zip

拈花ヽ惹草 提交于 2019-12-05 04:58:54
I created a build definition in vsts with npm build and then I copy the build folder to the drop location. The build pipeline is working fine Then I created the release definition and it downloads the files correctly also: 2018-08-10T16:29:18.5241580Z Downloading artifact drop from: https://xx.visualstudio.com//_apis/resources/Containers/711976?itemPath=drop&isShallow=true&api-version=4.1-preview.4 2018-08-10T16:29:18.5252684Z Downloading drop/s/build/asset-manifest.json to D:\a\r1\a\InnovationInABox-CI\drop\s\build\asset-manifest.json 2018-08-10T16:29:18.5253850Z Downloaded drop/s/build/asset

Can Yarn and npm be used by multiple developers on the same project?

流过昼夜 提交于 2019-12-05 04:46:50
I work in a team of about 20 other developers. All of our projects utilize npm packages and currently all of our developers are running npm to manage those packages. I'm very curious about Yarn and have it currently installed on my machine. However I'm nervous to actually use it to install packages in case it screws up a project for other developers. My question is can one developer utilize Yarn on a project while other devs are using npm in the same repo? From what I've read, Yarn uses the same package.json file to get its dependencies. We ignore the node_modules in our repo, however we use

Error: jest-haste-map: Haste module naming collision:

心已入冬 提交于 2019-12-05 00:01:26
I have created a custom npm module (will use xxx instead of its name) and link it manually using npm install . I tried very hard and searched : [Workarounds] Packager unable to resolve module from /Users/node_modules/ Error: jest-haste-map: @providesModule naming collision when using a local dependency before raising a question. I would be thankful if someone tell me what wrong with my code or my approach or any error in my code. When I run react-native run-android following error is raised by metro bundler Error: jest-haste-map: Haste module naming collision: Duplicate module name: react

Run yarn in a different path

本秂侑毒 提交于 2019-12-04 14:58:12
问题 Is there a way to specify a working directory for yarn? This would be different then the --modules-folder option. Specifically, I'm trying to run the yarn install command from a location outside of the package location. Similar to -C in git 回答1: --cwd is what you want. (tested with yarn 1.3.2) 回答2: You can use --cwd like so yarn --cwd <path> <yarn command> . The order of arguments is important. Example: yarn --cwd ~/test_project/ dev Because following will not work: yarn dev --cwd ~/test

How to use one package manager for backend and frontend? (Yarn/NPM)

会有一股神秘感。 提交于 2019-12-04 13:38:57
Previously I would use NPM for server side stuff and Bower for frontend. NPM would install to the node_modules/ directory and I had a .bowerrc to install those packages to public/lib . Now I've begun to use Yarn instead of NPM; and since they are pretty much 1:1 compatible it has been a smooth change.. However, now I'm wondering if I can ditch Bower and just use Yarn for everything. But I do not see a way (in either NPM or Yarn) to install normal packages to node_modules, but then have a sort of separate option to put some packages in public/ ... Something similar to the --dev option but

How can I version bump all my dependencies?

好久不见. 提交于 2019-12-04 13:12:48
Having yarn outdated is quite informative but I'd like to avoid running over package by package doing yarn upgrade . From yarn's documentation, just yarn upgrade without arguments is said to upgrade all dependencies but there's no change in my project's package.json and yarn outdated shows the same packages versions than before. Is there some command or argument that just bumps all my dependencies? If not, is the practice discouraged in some way? You can update your packages to the latest version specified in the package.json using yarn upgrade without any args. This is taken from the docs :

tsconfig - How to ignore @types/whatever/node_modules for a specific directory?

扶醉桌前 提交于 2019-12-04 08:11:44
I'm running angular 1.5 with typescript (yay), and we include both @types/angular and @types/angular-mocks . The trouble is that @types/angular-mocks lists @types/angular as a dependency with * versioning. This causes yarn to install 1.6 in @types/angular-mocks/node_modules . The final result is a ts compile error: @types/angular 1.5 has a different definition for $inject than @types/angular 1.6 How can I get the tsconfig to ignore @types/angular-mocks/node_modules ? Here is my current tsconfig: { "compilerOptions": { "module": "commonjs", "target": "es5", "sourceMap": true, "noImplicitAny":

How to get yarn install --offline with node-sass working?

坚强是说给别人听的谎言 提交于 2019-12-04 07:47:45
I am trying to use yarn in offline mode because the build server I am using does not have access to yarn registry or github.com . I found this article on how to use yarn in offline mode which works great until I added node-sass. It appears even if you use yarn install --offline , node-sass will go to github.com to download libsass . Is there a way to instruct node-sass to use an offline version of libsass instead of going to github.com ? null_pointer As @jonrsharpe pointed out, you need to use either --sass-binary-site , --sass-binary-name or --sass-binary-path to to tell node-sass where to

How to get Heroku to recognize a yarn.lock or package.json within a subdirectory (not root)

你。 提交于 2019-12-04 02:19:40
I have a Rails application using React, Webpack, and Yarn for the client side. I have everything relating to the client side within the /client directory. This includes my yarn.lock and package.json files. I have a Procfile that cds into /client and properly runs yarn run build . This works locally with no errors. However, when I deploy/push to Heroku, my push is rejected and I get the following error: remote: cd client && yarn run build:production remote: sh: 1: yarn: not found remote: rake aborted! remote: Command failed with status (127): [cd client && yarn run build:production...] What