Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

yarn install throwing errors: error Command failed with exit code 1. #347

Closed
asharamseervi opened this issue Nov 4, 2018 · 24 comments · Fixed by #348 or #356
Closed

yarn install throwing errors: error Command failed with exit code 1. #347

asharamseervi opened this issue Nov 4, 2018 · 24 comments · Fixed by #348 or #356

Comments

@asharamseervi
Copy link

Hello devs, I saw you're making better UX ready admin. I just loved it & to explore it in deapth, I cloned and installed Yarn Dependencies as suggested in readme. Which have gone something unexpected. My bash history as follows: (Kindly help me, if I'm missing something)

For root folder:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS D:\Playground\tabler> git clone https://github.com/tabler/tabler-react
Cloning into 'tabler-react'...
remote: Enumerating objects: 262, done.
remote: Counting objects: 100% (262/262), done.
remote: Compressing objects: 100% (262/262), done.
remote: Total 8668 (delta 199), reused 17 (delta 0), pack-reused 8406
Receiving objects: 100% (8668/8668), 42.06 MiB | 447.00 KiB/s, done.
Resolving deltas: 100% (5676/5676), done.
Checking out files: 100% (1401/1401), done.

PS D:\Playground\tabler> cd .\tabler-react\

PS D:\Playground\tabler\tabler-react> yarn install
yarn install v1.12.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > eslint-config-react-app@2.1.0" has incorrect peer dependency "babel-eslint@^7.2.3".
warning " > eslint-config-react-app@2.1.0" has incorrect peer dependency "eslint@^4.1.1".
warning " > eslint-config-react-app@2.1.0" has incorrect peer dependency "eslint-plugin-jsx-a11y@^5.1.1".
warning "react-styleguidist > react-docgen-displayname-handler@2.1.0" has incorrect peer dependency "recast@0.12.6 || 0.13.0".
warning "react-styleguidist > webpack-dev-server@2.11.2" has incorrect peer dependency "webpack@^2.2.0 || ^3.0.0".
warning "react-styleguidist > webpack-dev-server > webpack-dev-middleware@1.12.2" has incorrect peer dependency "webpack@^1.0.0 || ^2.0.0 || ^3.0.0".
[4/4] Building fresh packages...
$ yarn run build && yarn run copytablercsstodist
yarn run v1.12.1
$ yarn run copytablercsstodist && rollup -c && yarn run flow:copy-source
$ mkdir -p dist && cp src/Tabler.css src/Tabler.RTL.css dist/ && cp -r src/fonts src/images dist/
'cp' 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.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

PS D:\Playground\tabler\tabler-react> yarn start
yarn run v1.12.1
$ yarn run copytablercsstodist && rollup -c -w
$ mkdir -p dist && cp src/Tabler.css src/Tabler.RTL.css dist/ && cp -r src/fonts src/images dist/
A subdirectory or file -p already exists.
Error occurred while processing: -p.
A subdirectory or file dist already exists.
Error occurred while processing: dist.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS D:\Playground\tabler\tabler-react>

and for example folder in separate terminal from VS Code.


Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS D:\Playground\tabler> cd .\tabler-react\example\
PS D:\Playground\tabler\tabler-react\example> yarn install
yarn install v1.12.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > react-google-maps@9.4.5" has unmet peer dependency "@types/googlemaps@^3.0.0".
warning " > react-google-maps@9.4.5" has unmet peer dependency "@types/markerclustererplus@^2.1.29".
warning " > react-google-maps@9.4.5" has unmet peer dependency "@types/react@^15.0.0 || ^16.0.0".
[4/4] Building fresh packages...

Done in 274.03s.
PS D:\Playground\tabler\tabler-react\example> yarn start
yarn run v1.12.1
$ react-scripts start
Starting the development server...
Failed to compile.

./src/HomePage.react.js
Module not found: Can't resolve 'tabler-react' in 'D:\Playground\tabler\tabler-react\example\src'
Compiling...

@aaimaawebs
Copy link

Actually issue with windows.

As 'cp' is not recognized as an internal or external command and cp should be replaced with copy for windows. Scripts should be written keeping mind of windows as well. Please improve these asap so windows developers leverage of this product.

@asharamseervi
Copy link
Author

Hello @tabler team, any updates on this?

@Greg-Hamel
Copy link
Contributor

I am sure a simple fix to your first issue related to the use of cp bash command would be to use a library such as shx.

I’ll have a look at the rest tonight and provide feedback

@Greg-Hamel
Copy link
Contributor

@asharamseervi @aaimaawebs Working on a pull request for the cp and rm commands to work on win32. I'll need someone to try the build process though, since I do not have access to a Windows system.

Greg-Hamel added a commit to Greg-Hamel/tabler-react that referenced this issue Nov 6, 2018
Add SHX dependency to allow posix-only command such as `rm` and `cp` to be called in the build
process.

fix tabler#347
@Greg-Hamel
Copy link
Contributor

@asharamseervi @aaimaawebs can you clone my fork and see if it solves the first issue?

If so report back here so we can integrate a solution.

Cheers,

@Greg-Hamel
Copy link
Contributor

We'll focus on the first issue until we can resolve it. The second issue might be caused by the failed build process.

@asharamseervi
Copy link
Author

Hello @GregoryHamel, Thankyou so much for your efforts.

I tried as you suggested, cloning your fork and yarn-installing node dependencies. And results are as follows(in referenced gist): https://gist.github.com/asharamseervi/c8062027879b8c832ce9ab7778ec9551

@Greg-Hamel
Copy link
Contributor

Excellent, the cp is no longer causing an issue.
I will investigate the problem with mkdir.

My first guess is once again command incompatibility. It seems that mkdir under windows has no -p option, it does this by default. Maybe applying SHX can have a good effect on that one too.

@asharamseervi
Copy link
Author

We can try it. It looks good to me, but never used it earlier.
I'm up for contribute, but not a hardcore developer. I'll more than happy to test and make tabler available for windows users too.

@Greg-Hamel
Copy link
Contributor

Keep us posted with the results.
Any help is always welcomed, especially from windows users.

@jonthomp
Copy link
Contributor

jonthomp commented Nov 6, 2018

🎉 This issue has been resolved in version 1.21.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@asharamseervi
Copy link
Author

Hey @AaronCoplan, why this issue got closed without any fix? I just tried newest release which was merged and issue still has to be fixed. Hope, this may be human error. Here are outputs from terminal.
I know this issue got referenced by @GregoryHamel, if this is the reason behind closing, it's okay. But, issue yet to be resolved.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS D:\Playground\tabler> git clone https://github.com/tabler/tabler-react
Cloning into 'tabler-react'...
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
Receiving objects: 100% (8707/8707), 42.02 MiB | 1.96 MiB/s, done.

Resolving deltas: 100% (5710/5710), done.
Checking out files: 100% (1401/1401), done.
PS D:\Playground\tabler> cd .\tabler-react\
PS D:\Playground\tabler\tabler-react> yarn install
yarn install v1.12.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > eslint-config-react-app@2.1.0" has incorrect peer dependency "babel-eslint@^7.2.3".
warning " > eslint-config-react-app@2.1.0" has incorrect peer dependency "eslint@^4.1.1".
warning " > eslint-config-react-app@2.1.0" has incorrect peer dependency "eslint-plugin-jsx-a11y@^5.1.1".
warning "react-styleguidist > react-docgen-displayname-handler@2.1.0" has incorrect peer dependency "recast@0.12.6 || 0.13.0".
warning "react-styleguidist > webpack-dev-server@2.11.2" has incorrect peer dependency "webpack@^2.2.0 || ^3.0.0".
warning "react-styleguidist > webpack-dev-server > webpack-dev-middleware@1.12.2" has incorrect peer dependency "webpack@^1.0.0 || ^2.0.0 || ^3.0.0".
[4/4] Building fresh packages...
$ yarn run build && yarn run copytablercsstodist
yarn run v1.12.1
$ yarn run copytablercsstodist && rollup -c && yarn run flow:copy-source
$ mkdir -p dist && cp src/Tabler.css src/Tabler.RTL.css dist/ && cp -r src/fonts src/images dist/
'cp' 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.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
PS D:\Playground\tabler\tabler-react>

@AaronCoplan
Copy link
Contributor

@asharamseervi Reopening the issue now, it was closed by the description of the pull request in #348

@AaronCoplan AaronCoplan reopened this Nov 7, 2018
@AaronCoplan
Copy link
Contributor

@GregoryHamel Line seems to be this one that is causing the error: https://github.com/GregoryHamel/tabler-react/blob/89b5aacc20fae663e77807ca83865f9c5e5829e1/package.json#L27

@Greg-Hamel
Copy link
Contributor

I agree, there seems to be something weird with mkdir -p <...> under windows. Some sources report that the -p option available in posix systems is a default option of mkdir under windows.

@asharamseervi, can you add shx in front of the mkdir call in package.json as highlighted in AaronCoplan’s reply above and report back?

Thank you!

@asharamseervi
Copy link
Author

Hey @GregoryHamel & @AaronCoplan,

I'm desperately looking to play with tabler-react in windows, as I really love it's UX <3 !! Please resolve installation dependencies asap so I can use it for my project and contribute back to project.
Thanks

Greg-Hamel added a commit to Greg-Hamel/tabler-react that referenced this issue Nov 11, 2018
I accidentally removed SHX dependency in my last commit, this should help with the win32
implementation.

fix tabler#347
@Greg-Hamel
Copy link
Contributor

@AaronCoplan my bad, my last commit removed the changes in my first one.
I'll do another pull request to see if it works.

@asharamseervi I'll need you to go back to my fork and see if it solves your issue. Please report back.

Cheers!

@asharamseervi
Copy link
Author

Hey @GregoryHamel, you can't believe, it's working now on windows 😃 !!

I cloned your fork, checked-out to shx branch and did hit yarn install & similarly from example directory. I got successfully running it in my windows system at http://localhost:3000 and outputs(terminal) are here: https://gist.github.com/asharamseervi/c8062027879b8c832ce9ab7778ec9551/revisions

So far, I can't able to run documentation, everything else working fine. Can be merged to core and released to test it on other environments.
I'm having windows 10 pro, node=v8.11.3, npm=v6.4.1

@Greg-Hamel
Copy link
Contributor

Greg-Hamel commented Nov 11, 2018 via email

@AaronCoplan
Copy link
Contributor

@asharamseervi We have merged #356 into master - can you check it out and let us know if things are working okay? Thanks!

@jonthomp
Copy link
Contributor

🎉 This issue has been resolved in version 1.21.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@asharamseervi
Copy link
Author

Hey @AaronCoplan & @GregoryHamel, I can confirm, it's working on windows with core tabler-react repo with master-branch.

Thankyou so much for merging & contributing. ❤️

@Greg-Hamel
Copy link
Contributor

Glad we could help!

@ishivamshukla
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants