yarnpkg

Ignore yarn missing unmet dependencies warning in azure pipelines

我怕爱的太早我们不能终老 提交于 2020-05-28 07:53:39
问题 I'm struggling to get a build with yarn working on azure pipelines build. I'm running on a self hosted windows 10 machine, with Node 8 and Yarn 1.13. My pipeline definition can be boiled down to: steps: - powershell: | yarn install --frozen-lockfile and the output I'm getting is ##[section]Starting: PowerShell ============================================================================== Task : PowerShell Description : Run a PowerShell script on Windows, macOS, or Linux. Version : 2.140.2

How to create an example for a react library

夙愿已清 提交于 2020-05-18 04:31:15
问题 In the root folder I have an index.js file with some React hooks and context. Some of the content looks like this: import React, { createContext, useContext, useState, useEffect, } from 'react'; //other stuff export const createStoreProvider = store => ({ children, }) => { const [state, setState] = useState(store.getState()); useEffect(() => { const remove = store.subscribe(() => { setState(store.getState()); }); return () => remove(); }, []); return ( <StoreContext.Provider value={state}>

How to create an example for a react library

感情迁移 提交于 2020-05-18 04:30:06
问题 In the root folder I have an index.js file with some React hooks and context. Some of the content looks like this: import React, { createContext, useContext, useState, useEffect, } from 'react'; //other stuff export const createStoreProvider = store => ({ children, }) => { const [state, setState] = useState(store.getState()); useEffect(() => { const remove = store.subscribe(() => { setState(store.getState()); }); return () => remove(); }, []); return ( <StoreContext.Provider value={state}>

Deploy to Heroku failed. move-file incompatible with node version

萝らか妹 提交于 2020-05-17 07:46:08
问题 I am struggling to deploy a new rails 6 app to heroku. It runs fine on my local. During the deployment process I receive the following output. Unfortunately, I am new to webpack and yarn. It seems like a version / dependency issue with move-file which in turn seems to be a dependency for webpacker. However, I have no idea how to resolve this. It seems to come down to this line: error move-file@2.0.0: The engine "node" is incompatible with this module. Expected version ">=10.17". Got "10.15.3"

Is there any harm in using NPM and Yarn in the same project?

删除回忆录丶 提交于 2020-05-14 15:55:13
问题 I have been using npm for a personal project and just recently stumbled across yarn. Would there be any harm or "intended side effects" to switching to yarn's package manager in the same project where I had been using npm? 回答1: Although a few commenters here say its ok to mix both yarn and npm on the same project, after using yarn and npm and then yarn again, this is what yarn has to say about it: warning package-lock.json found. Your project contains lock files generated by tools other than

Installing private package from Github Package registry fails with not found/not authorized

為{幸葍}努か 提交于 2020-05-13 06:41:13
问题 I created and published a private Github package. Trying to install it with yarn at first, I face the following issue: Whether I try with yarn or npm, it cannot find the package at all although following the exact steps documented by Github (https://help.github.com/en/github/managing-packages-with-github-package-registry/configuring-npm-for-use-with-github-package-registry). My .yarnrc : registry "https://npm.pkg.github.com/OWNER" With yarn, it continuously tries to look for the package at

Cannot import @material-ui/core/styles/MuiThemeProvider

自作多情 提交于 2020-05-12 02:43:09
问题 I am working on a React project, using Material UI React components. I want to import MuiThemeProvider in src/index.js like so import MuiThemeProvider from "@material-ui/core/styles/MuiThemeProvider"; . But I get Module not found: Can't resolve '@material-ui/core/styles/MuiThemeProvider' Checking the /node_modules/@material-ui/styles there is no MuiThemeProvider . I dont understand that. Installing the project freshly on another computer, the /node_modules/@material-ui/styles contains a

Cannot import @material-ui/core/styles/MuiThemeProvider

北战南征 提交于 2020-05-12 02:42:45
问题 I am working on a React project, using Material UI React components. I want to import MuiThemeProvider in src/index.js like so import MuiThemeProvider from "@material-ui/core/styles/MuiThemeProvider"; . But I get Module not found: Can't resolve '@material-ui/core/styles/MuiThemeProvider' Checking the /node_modules/@material-ui/styles there is no MuiThemeProvider . I dont understand that. Installing the project freshly on another computer, the /node_modules/@material-ui/styles contains a

How to run `yarn tag` programmatically from node.js?

对着背影说爱祢 提交于 2020-04-16 03:56:26
问题 I'd like to run yarn commands programmatically from node.js, but can't find any sdk or cli utility. The only thing is to spawn a new process, but that's hacky... 回答1: As of January 2019, Yarn does not have an API that you can call directly. You cannot require Yarn and use yarn commands similar to npm var npm = require('npm'); npm.load(function(err) { // handle errors // install module ffi npm.commands.install(['ffi'], function(er, data) { // log errors or data }); You can only use node's

Rails 6 and Tailwind CSS does not deploy to Heroku

不羁岁月 提交于 2020-04-13 17:09:26
问题 I have a Rails 6 app that was successfully deployed to Heroku and worked on localhost:3000. I added tailwindcss via yarn and webpack. It runs perfectly fine on localhost, but does not run on heroku. When I run heroku logs I get the following error I've read all the Heroku Rails 6 Webpacker issues, and tried all the suggestions. Nothing worked. I have commented out <%= stylesheet_pack_tag %> ... didn't help I have toggled extract_css: true in webpacker.yml file .... didn't help I have run