Skip to content

[Windows] error: Could not create shared environment for package 'gulp' #928

Closed

Description

@flexdevguy

Does Volta require administrator Privilege to install packages ?

>volta install gulp

throws the below error on Non-Admin User, if I try the same on Admin Privileged user CMD it works fine.

"volta" "install" "gulp"
Volta v1.0.1

Could not create shared environment for package 'gulp'

Please ensure you have correct permissions to the Volta directory.

Error cause: A required privilege is not held by the client. (os error 1314)

Activity

  1. charlespierce commented on Jan 23, 2021

    @charlespierce
    Contributor

    Hi @flexdevguy, thanks for the question! Do you have Developer Mode turned on? Volta works by creating symlinks, so as noted in the Getting Started guide, you either need to have Developer Mode enabled or be running as an administrator. Our recommendation is to use Developer Mode, since Volta doesn't need full administrative privileges and other tools (like npm) shouldn't be run as an administrator.

    If you do already have Developer Mode on, then for some reason Volta isn't able to create the symlinks within the Volta directory (%LOCALAPPDATA%\Volta\), so my next suggestion would be to check the direct permissions on that directory.

  2. charlespierce commented on Mar 11, 2021

    @charlespierce
    Contributor

    Closing as there has been no response, but feel free to re-open if this is still a problem or if you have any further questions.

  3. nirtamir2 commented on Apr 3, 2021

    @nirtamir2

    Hi,
    I have the same issue with installing expo-cli

    Volta error: Could not create shared environment for package 'expo-cli'
    
    Please ensure you have correct permissions to the Volta directory.
    

    @charlespierce enabled the developer mode. How to add the permissions to this directory?

  4. Aymkdn commented on May 4, 2021

    @Aymkdn

    You can open a PowerShell/CMD as an administrator (click right then run as admin) then run the command to install global package

  5. charlespierce commented on May 4, 2021

    @charlespierce
    Contributor

    Hi @nirtamir2, the ability to create symlinks should be the only thing necessary. The Volta directory should be in %LOCALAPPDATA%\Volta, which generally maps to C:\Users\<username>\AppData\Local\Volta, so that's the directory you can check for permissions.

    You also may need a restart after enabling developer mode (I don't remember off the top of my head, it's been a while since I turned it on), so that's another thing to try.

  6. nirtamir2 commented on May 4, 2021

    @nirtamir2

    I don't remember how I solved it, but my issue is resolved. Volta works perfectly on my windows machine. Thanks!

  7. klschm commented on Jun 11, 2021

    @klschm

    Hi,
    until a few minutes ago I have had the same problem and after fighting it for many hours now I solved it by copying the whole directory structure which was installed by the MSI installer to C:\Program Files\Volta manually to the user folder C:\Users\<username>\AppData\Local\Volta (because the binaries weren't there) and then it worked.
    So something's wrong with the MSI imo... Imo it should not install to C:\Program Files\Volta but to C:\Users\<username>\AppData\Local\Volta or the binaries should be copied or symlinked from C:\Program Files\Volta to C:\Users\<username>\AppData\Local\Volta or something like this...

  8. robert1826 commented on Aug 8, 2021

    @robert1826

    I just had this error today and it turned out that I was in fact working with volta this whole time without enabling dev mode :D .. once it was enabled the issue disappeared, I don't see any issue with the MSI (the most recent one)

  9. dschulten commented on Dec 27, 2021

    @dschulten

    On a German Windows enter "für Entwickler" while the Windows menu is open (no Cortana needed).

  10. webpig commented on Mar 3, 2023

    @webpig

    install as an administrator is work

  11. eleven12341241 commented on Jun 9, 2023

    @eleven12341241

    Hi, I have the same issue with installing expo-cli

    Volta error: Could not create shared environment for package 'expo-cli'
    
    Please ensure you have correct permissions to the Volta directory.
    

    @charlespierce enabled the developer mode. How to add the permissions to this directory?

    Using an administrator to open cmd for installation

  12. prateek-cs2012 commented on Jul 12, 2023

    @prateek-cs2012

    Hi, until a few minutes ago I have had the same problem and after fighting it for many hours now I solved it by copying the whole directory structure which was installed by the MSI installer to C:\Program Files\Volta manually to the user folder C:\Users\<username>\AppData\Local\Volta (because the binaries weren't there) and then it worked. So something's wrong with the MSI imo... Imo it should not install to C:\Program Files\Volta but to C:\Users\<username>\AppData\Local\Volta or the binaries should be copied or symlinked from C:\Program Files\Volta to C:\Users\<username>\AppData\Local\Volta or something like this...

    Perfect! I spent hours on this, tried literally everything: enabling the developer mode, resetting the environment variables, restarting the PC. This worked like BANG ON!!!

  13. JedShiMing commented on Aug 7, 2024

    @JedShiMing

    Hi, until a few minutes ago I have had the same problem and after fighting it for many hours now I solved it by copying the whole directory structure which was installed by the MSI installer to C:\Program Files\Volta manually to the user folder C:\Users\<username>\AppData\Local\Volta (because the binaries weren't there) and then it worked. So something's wrong with the MSI imo... Imo it should not install to C:\Program Files\Volta but to C:\Users\<username>\AppData\Local\Volta or the binaries should be copied or symlinked from C:\Program Files\Volta to C:\Users\<username>\AppData\Local\Volta or something like this...

    谢谢

  14. csj2000 commented on Feb 19, 2025

    @csj2000

    Hi,  你好, until a few minutes ago I have had the same problem and after fighting it for many hours now I solved it by copying the whole directory structure which was installed by the MSI installer to C:\Program Files\Volta manually to the user folder C:\Users\<username>\AppData\Local\Volta (because the binaries weren't there) and then it worked.直到几分钟前我都有相同的问题,经过几个小时的努力,我通过手动将 MSI 安装程序安装的整个目录结构复制到用户文件夹中(因为那里没有二进制文件)来解决这个问题,然后它就正常工作了。 So something's wrong with the MSI imo... Imo it should not install to C:\Program Files\Volta but to C:\Users\<username>\AppData\Local\Volta or the binaries should be copied or symlinked from C:\Program Files\Volta to C:\Users\<username>\AppData\Local\Volta or something like this...MSI imo 似乎有问题...我认为它不应该安装到 C:\Program Files\Volta ,而应该安装到 C:\Users\<username>\AppData\Local\Volta ,或者应该从 C:\Program Files\Volta 复制或创建符号链接到 C:\Users\<username>\AppData\Local\Volta ,或者类似这样...

    Thanks for sharing, it really helps.

  15. TamaraGeddert commented on Apr 30, 2025

    @TamaraGeddert

    Привет, @flexdevguy, спасибо за вопрос! У вас включен режим разработчика? Volta работает путем создания символических ссылок, поэтому, как указано в руководстве «Начало работы», вам нужно либо включить режим разработчика, либо работать от имени администратора. Мы рекомендуем использовать режим разработчика, поскольку Volta не требует полных прав администратора, а другие инструменты (например, npm) не следует запускать от имени администратора.

    Если у вас уже включён режим разработчика, то по какой-то причине Volta не может создавать символические ссылки в каталоге Volta (%LOCALAPPDATA%\Volta\), поэтому я бы посоветовал проверить прямые разрешения для этого каталога.

    спасибо

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions