yarnpkg

Issue with babel-jest dependency when running npm start in a React app

那年仲夏 提交于 2020-02-26 12:07:07
问题 All I am doing is running create-react-app and cd'ing into the app, then trying to run npm/yarn start . I get the following error/output/log. I have walked through all of the suggested steps. The only thing that works is the SKIP_PREFLIGHT_CHECK=true in my .env as the last resort for both Yarn and npm. I have recently updated to Mojave and had to reinstall my Xcode if people have had a similar experience. If the image isn't sufficient, I pasted the output below. Thanks so much for your help

TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received type undefined raised when starting react app

假如想象 提交于 2020-02-21 08:19:47
问题 I'm working on a project in React and ran into a problem that has me stumped. Whenever I run yarn start I get this error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined I have no idea why this is happening, if anyone has experienced this I would be grateful. 回答1: To fix this issue simply upgrade to "react-scripts": "^3.4.0" Overwrite the existing "react-scripts": "^3.x.x" with "react-scripts": "^3.4.0" in your package.json Delete your

TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received type undefined raised when starting react app

限于喜欢 提交于 2020-02-21 08:18:12
问题 I'm working on a project in React and ran into a problem that has me stumped. Whenever I run yarn start I get this error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined I have no idea why this is happening, if anyone has experienced this I would be grateful. 回答1: To fix this issue simply upgrade to "react-scripts": "^3.4.0" Overwrite the existing "react-scripts": "^3.x.x" with "react-scripts": "^3.4.0" in your package.json Delete your

TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received type undefined raised when starting react app

非 Y 不嫁゛ 提交于 2020-02-21 08:17:57
问题 I'm working on a project in React and ran into a problem that has me stumped. Whenever I run yarn start I get this error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined I have no idea why this is happening, if anyone has experienced this I would be grateful. 回答1: To fix this issue simply upgrade to "react-scripts": "^3.4.0" Overwrite the existing "react-scripts": "^3.x.x" with "react-scripts": "^3.4.0" in your package.json Delete your

Yarn - Node Sass does not yet support my current environment

微笑、不失礼 提交于 2020-01-30 04:06:10
问题 I'm using Sage WordPress starter theme - https://github.com/roots/sage. From today when I run yarn build (webpack --progress --config /webpack.config.js) appears this error: Module build failed: ModuleBuildError: Module build failed: Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (72) For more information on which environments are supported please see: https://github.com/sass/node-sass/releases/tag/v4.8.3 I also try to uninstall and

How to have yarn fail on yarn install when package.json and yarn.lock are out of sync?

元气小坏坏 提交于 2020-01-24 20:40:24
问题 On a project I have replaced npm with yarn to get the benefits of it, and also enforce our dependencies are locked in via the yarn.lock . Now, a developer added a library with npm@4, which only changed the package.json, and not of course the the yarn.lock. I would have expected the yarn install command to crash on the build server, yet yarn has the--to me unexpected behavior--of adding those libraries in their most current version and then updating the yarn.lock on the remote: $ yarn install

nvm with yarn Yarn requires Node.js 4.0 or higher to be installed

眉间皱痕 提交于 2020-01-23 12:04:35
问题 I have nvm: nvm ls v8.11.3 v8.11.4 -> v11.1.0 default -> 8.11.4 (-> v8.11.4) node -> stable (-> v11.1.0) (default) stable -> 11.1 (-> v11.1.0) (default) I installed yarn with: sudo apt-get install --no-install-recommends yarn I also added in .bashrc alias node=nodejs . But when I try yarn install I see: Yarn requires Node.js 4.0 or higher to be installed. How can I fix it? 回答1: This gist helped on this problem. Run the following commands echo "==> Installing Yarn package manager" rm -rf ~/

nvm with yarn Yarn requires Node.js 4.0 or higher to be installed

纵然是瞬间 提交于 2020-01-23 12:04:12
问题 I have nvm: nvm ls v8.11.3 v8.11.4 -> v11.1.0 default -> 8.11.4 (-> v8.11.4) node -> stable (-> v11.1.0) (default) stable -> 11.1 (-> v11.1.0) (default) I installed yarn with: sudo apt-get install --no-install-recommends yarn I also added in .bashrc alias node=nodejs . But when I try yarn install I see: Yarn requires Node.js 4.0 or higher to be installed. How can I fix it? 回答1: This gist helped on this problem. Run the following commands echo "==> Installing Yarn package manager" rm -rf ~/

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

吃可爱长大的小学妹 提交于 2020-01-23 01:34:05
问题 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

package.json scripts that work with npm and yarn?

若如初见. 提交于 2020-01-22 13:48:33
问题 I am using npm as a build tool and so in my package.json , and some of my scripts depend on other scripts: { "test": "npm run lint && mocha" } This hardcodes the npm package manager into package.json . How can make this approach to expressing dependencies work with both npm and yarn ? 回答1: The $npm_execpath environment variable refers to the build tool, so just replace npm with the $npm_execpath : { "test": "$npm_execpath run lint && mocha" } Both npm test and yarn test will work, and will