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

Fix checking devDependencies on early projects with mostly empty package.json #44

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Dec 11, 2023

Ran in to this while setting up release-plan on a new project:

❯ npm init release-plan-setup
Need to install the following packages:
create-release-plan-setup@1.4.0
Ok to proceed? (y) y
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
TypeError: Cannot read properties of undefined (reading 'release-plan')
    at updatePackageJSON (file://🏠/.npm/_npx/3d7cd7a712111503/node_modules/create-release-plan-setup/bin/release-plan-setup.js:66:24)
    at async file://🏠/.npm/_npx/3d7cd7a712111503/node_modules/create-release-plan-setup/bin/release-plan-setup.js:175:13
file://🏠/.npm/_npx/3d7cd7a712111503/node_modules/create-release-plan-setup/bin/release-plan-setup.js:66
    pkg.devDependencies['release-plan'],
                       ^

TypeError: Cannot read properties of undefined (reading 'release-plan')
    at updatePackageJSON (file://🏠/.npm/_npx/3d7cd7a712111503/node_modules/create-release-plan-setup/bin/release-plan-setup.js:66:24)
    at async file://🏠/.npm/_npx/3d7cd7a712111503/node_modules/create-release-plan-setup/bin/release-plan-setup.js:175:13

Node.js v18.19.0
npm ERR! code 1
npm ERR! path <repo>
npm ERR! command failed
npm ERR! command sh -c create-release-plan-setup

npm ERR! A complete log of this run can be found in: 🏠/.npm/_logs/2023-12-11T16_12_56_411Z-debug-0.log

Copy link
Member

@mansona mansona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch 🎉

@mansona mansona added the bug Something isn't working label Dec 11, 2023
@mansona mansona changed the title Early projects may not have devDependencies yet Fix checking devDependencies on early projects with mostly empty package.json Dec 11, 2023
@mansona mansona merged commit 1d1ba76 into embroider-build:main Dec 11, 2023
3 checks passed
@github-actions github-actions bot mentioned this pull request Dec 11, 2023
@NullVoxPopuli NullVoxPopuli deleted the patch-1 branch December 11, 2023 23:14
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

Successfully merging this pull request may close these issues.

2 participants