Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

0.5.0 - installs payload 2.x on project creation, but package.json causes payload 1.x to be installed #24

Closed
goigle opened this issue Oct 9, 2023 · 1 comment

Comments

@goigle
Copy link

goigle commented Oct 9, 2023

When creating the website template it installs the expect version of Payload: 2.0.3.

I pushed this to my repo and then came back to play around later, but on a different PC.

Running npm i causes Payload 1.15.8 to be installed.

It looks like a peer dependency issue as manually telling npm to load payload 2.0.3 gives a bunch of warnings:

npm WARN ERESOLVE overriding peer dependency      
npm WARN While resolving: test-site@1.0.0
npm WARN Found: payload@1.15.8
npm WARN node_modules/payload
npm WARN   peer payload@">= 1.8.2" from @payloadcms/plugin-cloud@2.2.2
npm WARN   node_modules/@payloadcms/plugin-cloud
npm WARN     @payloadcms/plugin-cloud@"^2.0.0" from the root project
npm WARN   5 more (@payloadcms/plugin-form-builder, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer payload@"^0.18.5 || ^1.0.0" from @payloadcms/plugin-form-builder@1.0.15
npm WARN node_modules/@payloadcms/plugin-form-builder
npm WARN   @payloadcms/plugin-form-builder@"^1.0.13" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: test-site@1.0.0
npm WARN Found: payload@1.15.8
npm WARN node_modules/payload
npm WARN   peer payload@">= 1.8.2" from @payloadcms/plugin-cloud@2.2.2
npm WARN   node_modules/@payloadcms/plugin-cloud
npm WARN     @payloadcms/plugin-cloud@"^2.0.0" from the root project
npm WARN   5 more (@payloadcms/plugin-form-builder, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer payload@"^0.18.5 || ^1.0.0" from @payloadcms/plugin-nested-docs@1.0.6
npm WARN node_modules/@payloadcms/plugin-nested-docs
npm WARN   @payloadcms/plugin-nested-docs@"^1.0.4" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: test-site@1.0.0
npm WARN Found: payload@1.15.8
npm WARN node_modules/payload
npm WARN   peer payload@">= 1.8.2" from @payloadcms/plugin-cloud@2.2.2
npm WARN   node_modules/@payloadcms/plugin-cloud
npm WARN     @payloadcms/plugin-cloud@"^2.0.0" from the root project
npm WARN   5 more (@payloadcms/plugin-form-builder, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer payload@"^0.18.5 || ^1.0.0" from @payloadcms/plugin-redirects@1.0.0
npm WARN node_modules/@payloadcms/plugin-redirects
npm WARN   @payloadcms/plugin-redirects@"^1.0.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: test-site@1.0.0
npm WARN Found: payload@1.15.8
npm WARN node_modules/payload
npm WARN   peer payload@">= 1.8.2" from @payloadcms/plugin-cloud@2.2.2
npm WARN   node_modules/@payloadcms/plugin-cloud
npm WARN     @payloadcms/plugin-cloud@"^2.0.0" from the root project
npm WARN   5 more (@payloadcms/plugin-form-builder, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer payload@"^0.18.5 || ^1.0.0" from @payloadcms/plugin-seo@1.0.13
npm WARN node_modules/@payloadcms/plugin-seo
npm WARN   @payloadcms/plugin-seo@"^1.0.10" from the root project

added 7 packages, removed 3 packages, changed 7 packages, and audited 1248 packages in 29s

Steps to reproduce:

  • Run the npx create-payload-app
  • Rename node_modules to node_modules_2
  • Run npm install
  • Payload 1.15.8 should be installed

Files attached for your viewing pleasure:

package.json.txt
package-lock.json.txt

@goigle goigle changed the title 0.5.0 website template no longer works 0.5.0 website template missing mongodb url in payload.init Oct 9, 2023
@goigle goigle changed the title 0.5.0 website template missing mongodb url in payload.init 0.5.0 - installs payload 2.x on project creation, but package.json causes payload 1.x to be installed Oct 10, 2023
@goigle
Copy link
Author

goigle commented Oct 10, 2023

I got around it by installing yarn before running the command and it generated a yarn.lock with proper dependencies.

@goigle goigle closed this as completed Oct 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant