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

NPM install fails with 'edgesout' error #136

Closed
2 tasks done
enpesavento opened this issue Feb 21, 2024 · 3 comments
Closed
2 tasks done

NPM install fails with 'edgesout' error #136

enpesavento opened this issue Feb 21, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@enpesavento
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

4.26.0

Plugin version

6.0.2

Node.js version

21.6.2

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

14.3.1

Description

When I try to run the installation command, an npm error appears:

npm ERR! Cannot read properties of null (reading 'edgesOut')

I also tried putting the latest version of the plugin in the dependencies, deleted the node_modules and the lock file and ran the install command and got this result:

"dependencies": {
    "@fastify/vite": "^6.0.2"
    ...
}
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: fastify-vite-test@0.0.1
npm ERR! Found: @fastify/vite@6.0.2
npm ERR! node_modules/@fastify/vite
npm ERR!   @fastify/vite@"^6.0.2" from the root project
npm ERR!   peer @fastify/vite@"^6.0.0-alpha.0" from @fastify/htmx@0.2.0
npm ERR!   node_modules/@fastify/htmx
npm ERR!     peer @fastify/htmx@"^0.2.0" from @fastify/vite@6.0.2
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @fastify/vite@"^5.0.5" from @fastify/react@0.3.0
npm ERR! node_modules/@fastify/react
npm ERR!   peer @fastify/react@"^0.3.0" from @fastify/vite@6.0.2
npm ERR!   node_modules/@fastify/vite
npm ERR!     @fastify/vite@"^6.0.2" from the root project
npm ERR!     1 more (@fastify/htmx)
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

With the previous major version (v5.0.6) of the plugin the installation works correctly.

~ npm i @fastify/vite@5.0.6

added 46 packages, and audited 765 packages in 8s

123 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Steps to Reproduce

In a new folder:

~ npm init
~ npm i fastify @fastify/vite react react-dom

npm ERR! Cannot read properties of null (reading 'edgesOut')

Expected Behavior

No response

@galvez
Copy link
Member

galvez commented Feb 21, 2024

For the moment, use npm i <...> --legacy-peer-deps. I'll look into what needs to be done to fix this.

@galvez galvez self-assigned this Feb 22, 2024
@galvez galvez added the bug Something isn't working label Feb 22, 2024
@mcollina
Copy link
Member

@galvez stop using peerDependencies. They are more trouble than they are worth (unfortunately).

@galvez
Copy link
Member

galvez commented Feb 26, 2024

Latest release dropped peerDependencies.

@galvez galvez closed this as completed Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants