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

Failing encore run - missing PnP support #1613

Open
rtritto opened this issue Dec 1, 2024 · 5 comments
Open

Failing encore run - missing PnP support #1613

rtritto opened this issue Dec 1, 2024 · 5 comments

Comments

@rtritto
Copy link

rtritto commented Dec 1, 2024

Reproduction

repository=repro-encore-win ~ branch=start-server

  • iwr https://encore.dev/install.ps1 | iex
  • git clone https://github.com/rtritto/repro-encore-win.git
  • cd repro-encore-win
  • git checkout start-server
  • yarn
  • encore run
      ⠋ Building Encore application graph...
      ⠋ Analyzing service topology...
    setup deps
    
    Caused by:
        0: setup dependencies
        1: yarn install failed
        2: program not found
    
    Stack backtrace:
       0: anyhow::backtrace::capture::Backtrace::capture
       1: <encore_tsparser::builder::package_mgmt::YarnPackageManager as encore_tsparser::builder::package_mgmt::PackageManager>::setup_deps
       2: scoped_tls::ScopedKey<T>::set
       3: tsparser_encore::main
       4: std::sys_common::backtrace::__rust_begin_short_backtrace
       5: main
       6: __tmainCRTStartup
       7: mainCRTStartup
       8: <unknown>
       9: <unknown>
  • .yarnrc.yml is updated:
    -nodeLinker: pnp
    +nodeLinker: node-modules
    -
    plugins:
    -  - checksum: 5e73a1acbb9741fce1e8335e243c9480ea2107b9b4b65ed7643785ddea9e3019aee254a92a853b1cd71023b16fff5b7d3afd5256fe57cd35a54f8785b8c30281
    -    path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
    -    spec: "https://github.com/mskelton/yarn-plugin-outdated/raw/v4.0.1/bundles/@yarnpkg/plugin-outdated.js"
    -  - checksum: 7930a64ba6239d4502df0204edda913788df1a9614a9056d23b53345d844f6f13526dae71c2be5282071502c3c077db7b1e97bcf019037db3ca35c737cd25b0c
    -    path: .yarn/plugins/plugin-dedupe-on-install.cjs
    -    spec: "https://raw.githubusercontent.com/ambar/yarn-plugin-dedupe-on-install/main/index.js"
    +- checksum: 5e73a1acbb9741fce1e8335e243c9480ea2107b9b4b65ed7643785ddea9e3019aee254a92a853b1cd71023b16fff5b7d3afd5256fe57cd35a54f8785b8c30281
    +  path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
    +  spec: https://github.com/mskelton/yarn-plugin-outdated/raw/v4.0.1/bundles/@yarnpkg/plugin-outdated.js
    +- checksum: 7930a64ba6239d4502df0204edda913788df1a9614a9056d23b53345d844f6f13526dae71c2be5282071502c3c077db7b1e97bcf019037db3ca35c737cd25b0c
    +  path: .yarn/plugins/plugin-dedupe-on-install.cjs
    +  spec: https://raw.githubusercontent.com/ambar/yarn-plugin-dedupe-on-install/main/index.js
    
    yarnPath: .yarn/releases/yarn-4.5.3.cjs

Info

OS: Windows 11
Node: v22
encore.dev: v1.44.6 (same behavior with v1.44.5)
encode installed v1.44.5
yarn berry with PnP (Plug'n'Play)

@eandre
Copy link
Member

eandre commented Dec 2, 2024

Encore's dependency resolver currently requires node_modules. We have looked into supporting pnp but it's not a high priority at the moment. Last time I looked the format is not very well documented so building tooling to support it is relatively difficult.

@rtritto
Copy link
Author

rtritto commented Dec 2, 2024

FYI @arcanis @merceyz

@eandre
Copy link
Member

eandre commented Dec 2, 2024

Or are you saying you are using yarn's node_modules mode? That should definitely work.

@rtritto
Copy link
Author

rtritto commented Dec 2, 2024

Or are you saying you are using yarn's node_modules mode? That should definitely work.

No, I'm using Plug'n'Play instead of node_modules:

.yarnrc.yml

nodeLinker: pnp

@rtritto
Copy link
Author

rtritto commented Dec 2, 2024

Maybe encore.exe point to C:\Users\<USER>\.encore\runtimes\js\encore.dev\package.json instead of package.json of the project (where I run encore run and where there is encore.app file).

Why encore.dev dependency is duplicated in C:\Users\<USER>\.encore\runtimes\js? encore.dev dependency is already installed in the project (package.json).

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