ethereum / mist

[DEPRECATED] Mist. Browse and use Ðapps on the Ethereum network.
http://ethereum.org
GNU General Public License v3.0
7.44k stars 2.12k forks source link

yarn+react: error Command failed with exit code 1 #4009

Closed lionroy closed 6 years ago

lionroy commented 6 years ago

Hi y'all!

trying to compile this react app [ build via crete-react-app] and figuring styled-components is rather useful. worked fine last i checked. compiling error statrted after have installed babel as recommended in their babel site.. kinda normal i guess.

for >$ yarn run build I get this - yarn run v1.3.2 $ react-scripts build 'react-scripts' is not recognized as an internal or external command, operable program or batch file. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

also - for > $ yarn start yarn run v1.3.2 $ react-scripts start 'react-scripts' is not recognized as an internal or external command, operable program or batch file. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

this is the error file generated- yarn-error.log

Yarn Version: `1.3.2`
OS & Version: windows/linux/osx
Node version: `geth 8.9.2`
Number of blocks synchronized: 0

TYVM

ryanio commented 6 years ago

Hey there. I'm not sure if you opened this issue in the wrong repo, but Mist is not a react app (nor a create-react-app). It is a hybrid meteor-react app right now, but we are slowly converting it over to all react.

lionroy commented 6 years ago

ryanio - to be honest not sure what do you mean, about issue and repo I logged to Mist and asked, in a create-react-app room. yet then. there was that. :)

lionroy commented 6 years ago

Solved.

Here's how. sorta. so- PROBLEM - it seems installing babel changed many nodes, yet it did NOT update the yarn.lock and package.json files accordingly. SOLUTION - $ yarn info |> made me realize some 2k files are out of date then ran $ yarn upgrade |> and it somehow sorted it but didn't compile yet then $ yarn add yarn |> to actually update yarn as it was 1.3.x and required 1.7.x

i think that's it yet, may have skipped a step or two... better read more about the cli commands i suppose.

simoutn commented 5 years ago

its not working for me Still have the error : error An unexpected error occurred: "Cannot read property '1' of null".

simoutn commented 5 years ago

i resole the problem when i edit webpack.config.js ( i remove the addStyleEntry )

glenpegado commented 5 years ago

Solved.

Here's how. sorta. so- PROBLEM - it seems installing babel changed many nodes, yet it did NOT update the yarn.lock and package.json files accordingly. SOLUTION - $ yarn info |> made me realize some 2k files are out of date then ran $ yarn upgrade |> and it somehow sorted it but didn't compile yet then $ yarn add yarn |> to actually update yarn as it was 1.3.x and required 1.7.x

i think that's it yet, may have skipped a step or two... better read more about the cli commands i suppose.

It worked! This has aged well

Franklin-Graciliano commented 4 years ago

error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Help

CoBe18 commented 4 years ago

I received the same error as Franklin-Graciliano did.

package.json public src

Either try using a new directory name, or remove the files listed above. error Command failed. Exit code: 1 Command: /usr/local/bin/create-react-app

schroef commented 4 years ago

error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Help

Sorry but that link shows nothing related to error code 1, only shows some yarn codes

techev13 commented 4 years ago

Solved.

Here's how. sorta. so- PROBLEM - it seems installing babel changed many nodes, yet it did NOT update the yarn.lock and package.json files accordingly. SOLUTION - $ yarn info |> made me realize some 2k files are out of date then ran $ yarn upgrade |> and it somehow sorted it but didn't compile yet then $ yarn add yarn |> to actually update yarn as it was 1.3.x and required 1.7.x

i think that's it yet, may have skipped a step or two... better read more about the cli commands i suppose.

worked for me too

piercerhymes commented 4 years ago

One of the issue that you may face is the server won't start if some other server is running too . For eg. I had XAMP Running and thus my yarn couldn't start itself. Check it once.

deSousaMateus commented 4 years ago

(Mac) In my case, I had this problem after cloning a repo from my work project, what I had to do was 'cd ios' and run 'pod install' inside there. After this I was able to build my local copy of the project. Hope it helps someone

syedhaseeb16 commented 4 years ago

I was facing error, I use command yarn install and then yarn upgrade, now its working