-
-
Notifications
You must be signed in to change notification settings - Fork 624
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
bug: require(...).default is not a function #572
Comments
@dhruvdutt do you mind fixing this? |
This is happening because you have older version of Can you please upgrade to latest version |
@ematipico you are right. thank you. sorry, my npm registry is npm install @webpack-cli/generate-plugin@0.1.0`, it works, but with error
I copy the miss files in the repository
|
https://www.npmjs.com/package/@webpack-cli/generate-plugin It looks like it's there. Are you hitting the correct registry? |
Seems like we might need to support China ( Tabao ) as well. Makes sense? |
Yes |
@huixisheng We're identified and resolved the issue. We'll soon release a new version with the fix. |
👍 but will do scripts webpack-defaults, it's default config ?
|
Could you elaborate @huixisheng ? |
I don't think I understand your question. Are you trying to run webpack-defaults and you are wondering if it is ok to run it through webpack-cli? |
I came across the same issue, this is properly a fix: } else {
let p = require(pathForCmd), c = p[packages];
if (typeof c !== 'function' && typeof p.default === 'function') {
c = p.default;
}
c(...args); // eslint-disable-line
} which replaced the original ( } else {
require(pathForCmd).default(...args); // eslint-disable-line
} the strange things in this fix is about |
Maybe you can do a PR to fix this? That would be great 🤗😍 |
the strange things in this fix is about packages -- if it's not indicating the sub-command or a list of commands?
|
* fix(prompt-command, serve): force default package export, add serve default ISSUES CLOSED: #572 * misc(serve): remove unnecessary exports, update docs
…pack#815) * fix(prompt-command, serve): force default package export, add serve default ISSUES CLOSED: webpack#572 * misc(serve): remove unnecessary exports, update docs
Describe the bug
package.json
with contentWhat is the current behavior?
To Reproduce
Expected behavior
only my-webpack-plugin create.
Screenshots
Additional context
Add any other context about the problem here like linking to an similar issue you might think is the cause.
The text was updated successfully, but these errors were encountered: