Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yarn install fail #2

Open
ech01 opened this issue Aug 9, 2017 · 6 comments
Open

Yarn install fail #2

ech01 opened this issue Aug 9, 2017 · 6 comments

Comments

@ech01
Copy link

ech01 commented Aug 9, 2017

After installing yarn (via downloadable msi from the yarn site) and running the install command, an error occurs. Here is the output.

C:\devsites\Dnn.Evoq.LiquidContent.Samples.Public\APIExplorer> yarn install
yarn : The term 'yarn' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1

  • yarn install
  •   + CategoryInfo          : ObjectNotFound: (yarn:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

image

Is there more to the yarn installation process?

@ech01
Copy link
Author

ech01 commented Aug 9, 2017

Exiting powershell and retrying the command works.

However, yarn install fails at

[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/npm/tslint/-/tslint-4.4.2.tgz: Request failed "404 Not Found"".
info If you think this is a bug, please open a bug report with the information provided in "C:\devsites\Dnn.Evoq.LiquidContent.Samples.Public\APIExplorer\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

@wmorgenweck
Copy link
Contributor

Try running "npm install" instead. That worked for me.

@ech01
Copy link
Author

ech01 commented Aug 9, 2017

@wmorgenweck Good workaround. Thanks!

@richard-edwards
Copy link

yarn install still isn't working with this repo. npm install does but the docs should be fixed or yarn fixed

@jayaramsurya
Copy link

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

PS C:\Users> choco install yarn
Chocolatey v0.10.11
Chocolatey detected you are not running from an elevated command shell
(cmd/powershell).

You may experience errors - many functions/packages
require admin rights. Only advanced users should run choco w/out an
elevated shell. When you open the command shell, you should ensure
that you do so with "Run as Administrator" selected. If you are
attempting to use Chocolatey in a non-administrator setting, you
must select a different location other than the default install
location. See
https://chocolatey.org/install#non-administrative-install for details.

Do you want to continue?([Y]es/[N]o): yes

Installing the following packages:
yarn
By installing you accept licenses for the packages.
yarn not installed. An error occurred during installation:
Access to the path 'C:\ProgramData\chocolatey\lib\yarn\tools' is denied.
yarn package files install completed. Performing other installation steps.
The install of yarn was NOT successful.
yarn not installed. An error occurred during installation:
Access to the path 'C:\ProgramData\chocolatey\lib\yarn\tools' is denied.

Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

  • yarn (exited 1) - yarn not installed. An error occurred during installation:
    Access to the path 'C:\ProgramData\chocolatey\lib\yarn\tools' is denied.
    PS C:\Users>
    PS C:\Users> yarn -version
    yarn : The term 'yarn' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
  • yarn -version
  •   + CategoryInfo          : ObjectNotFound: (yarn:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    
    

PS C:> yarn -version
yarn : The term 'yarn' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • yarn -version
  •   + CategoryInfo          : ObjectNotFound: (yarn:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

PS C:> npm install yarn
npm WARN saveError ENOENT: no such file or directory, open 'C:\package.json'
npm WARN saveError EPERM: operation not permitted, open 'C:\package-lock.json.221618176'
npm WARN enoent ENOENT: no such file or directory, open 'C:\package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.

  • [email protected]
    added 1 package and audited 1 package in 4.658s
    found 0 vulnerabilities

@md-quneifdi
Copy link

problem solving steps :
1 - run the powerSell as an administrator
2 - open the folder that you want to run Yarn on it in the terminal :

  • Example : C:\Users\dell\Desktop\yarntest
    3 - type the following command :
    Set-ExecutionPolicy RemoteSigned
    4 - try to run Yarn again : yarn -v
    Now Everything is working..
    5 - to turn to the defaul just run the following command :
    Set-ExecutionPolicy Restricted
    you can watch this video to more understand :
    https://youtu.be/lq2QBZsyF9A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants