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
Error [ERR_INVALID_PACKAGE_CONFIG]: Invalid package config #4147
Comments
To get around this error I had to patch it
|
Is this still an issue in the latest version? I notice the 2.11.0: https://unpkg.com/browse/uswds@2.11.0/package.json |
Is this still an issue @smustgrave ? Thanks! |
I saw it upgrading to 2.13 following the steps from uswds gulp |
@smustgrave I wasn't able to reproduce on a test project. Here's what I used locally:
Running Returns
Even trying to run the lint task in USWDS returns this:
Could you please give us more information on what you're trying to do? USWDS-Gulp has no lint tasks and the one defined in USWDS is for local development. I recommend replacing uswds-gulp with uswds-compile. Maybe that will work better for you. |
Closing since this is stale and we can't reproduce it. |
Describe the bug
Potential error in the package.json file. Not this was working before upgrading to 2.11
Steps to reproduce the bug
I'm running gulp locally. And when I run node node_modules/gulp/bin/gulp.js lint
I get
Error [ERR_INVALID_PACKAGE_CONFIG]: Invalid package config [my PATH]node_modules/uswds/package.json. "exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.
Now I changed the exports in the package.json to
"exports": {
"./package.json": "./package.json",
".": {
"import": "./dist/js/uswds.min.js",
"default": "./dist/js/uswds.min.js"
}
},
and it worked.
Expected behavior
For the linter to run
The text was updated successfully, but these errors were encountered: