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

Error unable to symlink local encore.dev using pnpm #1658

Open
clabnet opened this issue Dec 18, 2024 · 8 comments
Open

Error unable to symlink local encore.dev using pnpm #1658

clabnet opened this issue Dec 18, 2024 · 8 comments

Comments

@clabnet
Copy link

clabnet commented Dec 18, 2024

Using pnpm i I have this error:

PS D:\Weblabs\nodejs\ENCORE\drizzle-sample> pnpm i
 WARN  2 deprecated subdependencies found: @esbuild-kit/[email protected], @esbuild-kit/[email protected]
Packages: +44
++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 88, reused 44, downloaded 0, added 44, done

dependencies:
+ @types/pg 8.11.10
+ drizzle-orm 0.36.4 (0.38.2 is available)
+ encore.dev 1.45.2
+ pg 8.13.1

devDependencies:
+ @types/node 20.17.10 (22.10.2 is available)
+ drizzle-kit 0.27.2 (0.30.1 is available)
+ typescript 5.7.2

Done in 2s
PS D:\Weblabs\nodejs\ENCORE\drizzle-sample> encore build docker --config infra.config.json drizzle_test:0.0.1
10:58PM ERR setup deps

Caused by:
    0: setup dependencies
    1: unable to symlink local encore.dev
    2: symlink encore.dev directory at "D:\\Weblabs\\nodejs\\ENCORE\\drizzle-sample\\node_modules\\encore.dev"
    3: Cannot create a file when that file already exists. (os error 183)

Stack backtrace:
   0: anyhow::backtrace::capture::Backtrace::capture
   1: encore_tsparser::builder::package_mgmt::symlink_encore_dev
   2: <encore_tsparser::builder::package_mgmt::NpmPackageManager as encore_tsparser::builder::package_mgmt::PackageManager>::setup_deps
   3: scoped_tls::ScopedKey<T>::set
   4: tsparser_encore::main
   5: std::sys::backtrace::__rust_begin_short_backtrace
   6: main
   7: __tmainCRTStartup
   8: mainCRTStartup
   9: <unknown>
  10: <unknown>
PS D:\Weblabs\nodejs\ENCORE\drizzle-sample> 
@fredr
Copy link
Member

fredr commented Jan 10, 2025

Hi,

Could you try updating to the latest encore version and try again?
Run encore version update to get the latest version.

You might have to remove node_modules, or at least encore.dev within node_modules before you try again.

Let me know if that solve the problem

@clabnet
Copy link
Author

clabnet commented Jan 10, 2025

Sorry, but the upgrade to v.14.5.6 on Windows 11, as administrator, an also from the Windows PowerShell don't run.

image

image

@fredr
Copy link
Member

fredr commented Jan 10, 2025

Hmm, that is strange, I'll have to look into if I can reproduce that myself.

If you stop encore in the task manager, and then re-run the update, does it then work? as a workaround

@fredr
Copy link
Member

fredr commented Jan 14, 2025

@clabnet I've made an update to the install script that should hopefully solve your update issues. Please try again to run encore version update and let me know if you have any issues with that still.

@clabnet
Copy link
Author

clabnet commented Jan 14, 2025

@fredr same issue, also opening the terminal as admin

image

@fredr
Copy link
Member

fredr commented Jan 14, 2025

Could you try to execute the install script directly:

iwr https://encore.dev/install.ps1 -useb | iex

Does that yeild any errors or any other output?

I wonder if the install.ps1 is cached somehow. Maybe you could download it by entering https://encore.dev/install.ps1 in a browser and check if line 42 is a comment saying:

# It is not possible to remove running exe-files, but it is possible to rename them

@clabnet
Copy link
Author

clabnet commented Jan 14, 2025

Good @fredr !
It run when executing into a fresh terminal Powershell.

image

Downloading the script from the browser it has the string in line 42.

@fredr
Copy link
Member

fredr commented Jan 16, 2025

It is strange that that one works but not encore version update since that is the same command that is being executed.

Maybe you can try once more to run encore version update now that we have released a new version, and see if it was some sort of caching issue of the install script

otherwise I'll see if I can manage to reproduce it somehow. Do you run any antivirus or something like that that might deny a script from being executed?

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

2 participants