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

Webpack: Remove npm init -y command from tutorial #29306

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

MaoShizhong
Copy link
Contributor

Because

Soon, Node LTS will ship with npm v11 which will enforce a "type" field in package.json via npm init -y, which is used in the Webpack lesson tutorial. This will cause bundling errors with the current lesson contents. Since installing Webpack will create a "type"-less package.json anyway, we can remove npm init -y.

This PR

  • Removes npm init -y command
  • Adds sentence about package.json autocreation and contents

Issue

Closes #29303

Additional Information

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

Will cause issues when using npm v11+ due to enforced 'type' field
@github-actions github-actions bot added the Content: JavaScript Involves the JavaScript course label Jan 10, 2025
Copy link
Contributor

@JoshDevHub JoshDevHub left a comment

Choose a reason for hiding this comment

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

Excellent work as always 🚀

@JoshDevHub JoshDevHub merged commit 663579c into TheOdinProject:main Jan 10, 2025
2 checks passed
@MaoShizhong MaoShizhong deleted the webpack-npm-init branch January 10, 2025 22:27
csm-18 added a commit to csm-18/curriculum that referenced this pull request Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: JavaScript Involves the JavaScript course
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webpack: Latest npm init -y version creates Node module loader problems
2 participants