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

Invalid main field in package.json #80

Open
crankoide opened this issue Nov 18, 2021 · 7 comments
Open

Invalid main field in package.json #80

crankoide opened this issue Nov 18, 2021 · 7 comments
Assignees

Comments

@crankoide
Copy link

The main field in package.json points to a file that is not existent in the published package. Since using Node.js 16 I get following warning when ESLinting my code.

(node:1169) [DEP0128] DeprecationWarning: Invalid 'main' field in '/<project name>/node_modules/eslint-plugin-react-redux/package.json' of 'dist/index.js'. Please either fix that or report it to the module author
@ljharb
Copy link
Collaborator

ljharb commented Nov 18, 2021

Seems like a duplicate of #74.

@crankoide
Copy link
Author

crankoide commented Nov 18, 2021

Seems like a duplicate of #74.

Yes, but #74 has been closed without solving it. The main field value is wrong because the referenced dist folder is not existent within the published package.

@ljharb
Copy link
Collaborator

ljharb commented Nov 18, 2021

Sure, but it can be reopened instead of filing a duplicate :-)

Which exact version of the package do you have?

@ljharb
Copy link
Collaborator

ljharb commented Nov 18, 2021

ah, i see that the dist folder is missing in https://unpkg.com/browse/[email protected]/

@DianaSuvorova, you may need to add a prepublishOnly script to ensure the build runs prior to publishing.

@crankoide
Copy link
Author

Sure, but it can be reopened instead of filing a duplicate :-)

Which exact version of the package do you have?

Didn't find the reopen button. 😄 I guess it's reserved for the collaborators?

I use the latest package v3.3.2. Node.js v16.13.0.

@ljharb
Copy link
Collaborator

ljharb commented Nov 18, 2021

(a comment asking for it to be reopened is usually sufficient)

@srt4rulez
Copy link

Even though #81 was merged, this still seems to be an issue in 3.3.4 with the dist folder created, because package.json main points to dist/index.js, which doesn't exist.

"main": "dist/index.js",

https://github.com/DianaSuvorova/eslint-plugin-react-redux/blob/v3.3.4/package.json#L12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants