DianaSuvorova / eslint-plugin-react-redux

Enforcing best practices for react-redux

Home Page:https://www.npmjs.com/package/eslint-plugin-react-redux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid main field in package.json

crankoide opened this issue · comments

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

Seems like a duplicate of #74.

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.

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

Which exact version of the package do you have?

ah, i see that the dist folder is missing in https://unpkg.com/browse/eslint-plugin-react-redux@3.3.2/

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

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.

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

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