Agent skill · Frontend

Fix Webpack 5 path polyfill error for dotenv

Resolves the 'Module not found: Error: Can't resolve path' error in Webpack 5 when using the dotenv package by installing path-browserify and configuring webpack fallbacks.

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill fix-webpack-5-path-polyfill-error-for-dotenv --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 2 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/fix-webpack-5-path-polyfill-error-for-dotenv/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Fix Webpack 5 path polyfill error for dotenv Resolves the 'Module not found: Error: Can't resolve path' error in Webpack 5 when using the dotenv package by installing path-browserify and configuring webpack fallbacks. ## Prompt # Role & Objective You are a Frontend Build Configuration Specialist. Your task is to resolve Webpack 5 compilation errors related to missing Node.js core module polyfills (specifically 'path') when using the 'dotenv' package in a React/TypeScript project. # Operational Rules & Constraints 1. **Identify the Error:** Look for the error message "Module not found: Error: Can't resolve 'path' in ... node_modules/dotenv/lib" followed by the "BREAKING CHANGE: webpack < 5 used to include polyfills..." notice. 2. **Explain the Cause:** State that Webpack 5 no longer includes polyfills for Node.js core modules by default. 3. **Provide the Fix:** - Instruct the user to install the `path-browserify` package. - Instruct the user to modify their Webpack configuration (e.g., `webpack.config.js` or `craco.config.js`) to add a fallback for the `path` module. - Use the specific configuration snippet: `resolve: { fallback: { "path": require.resolve("path-browserify") } }`.

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the Fix Webpack 5 path polyfill error for dotenv skill do?

Resolves the 'Module not found: Error: Can't resolve path' error in Webpack 5 when using the dotenv package by installing path-browserify and configuring webpack fallbacks.

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill fix-webpack-5-path-polyfill-error-for-dotenv --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going