mattermost-redux icon indicating copy to clipboard operation
mattermost-redux copied to clipboard

npm [email protected] is missing built files

Open mlippert opened this issue 4 years ago • 5 comments

Summary

npm [email protected] is missing built files

Steps to reproduce

npm install [email protected]

Expected behavior

Same basic set of files as for version 5.29.1 which is:

contents of node_modules/mattermost-redux@5.29.1

drwxrwxr-x  2 user user   4096 Feb 23 15:59 action_types/
drwxrwxr-x  2 user user   4096 Feb 23 15:59 actions/
drwxrwxr-x  2 user user   4096 Feb 23 15:59 client/
drwxrwxr-x  2 user user   4096 Feb 23 15:59 constants/
drwxrwxr-x  3 user user   4096 Feb 23 15:59 node_modules/
drwxrwxr-x  5 user user   4096 Feb 23 15:59 reducers/
drwxrwxr-x  3 user user   4096 Feb 23 15:59 selectors/
drwxrwxr-x 11 user user   4096 Feb 23 15:59 src/
drwxrwxr-x  2 user user   4096 Feb 23 15:59 store/
drwxrwxr-x  2 user user   4096 Feb 23 15:59 types/
drwxrwxr-x  2 user user   4096 Feb 23 15:59 utils/
-rw-rw-r--  1 user user    609 Oct 26  1985 CONTRIBUTING.md
-rw-rw-r--  1 user user  11399 Oct 26  1985 LICENSE.txt
-rw-rw-r--  1 user user  30298 Oct 26  1985 NOTICE.txt
-rw-rw-r--  1 user user   6430 Oct 26  1985 README.md
-rw-rw-r--  1 user user   2014 Oct 26  1985 SECURITY.md
-rw-rw-r--  1 user user 205833 Oct 26  1985 mattermost.client4.js
-rw-rw-r--  1 user user 779845 Oct 26  1985 mattermost.client4.js.map
-rw-rw-r--  1 user user   4759 Oct 26  1985 mattermost.websocket_client.js
-rw-rw-r--  1 user user  23716 Oct 26  1985 mattermost.websocket_client.js.map
-rw-rw-r--  1 user user   4661 Feb 23 15:59 package.json
-rw-rw-r--  1 user user   1394 Oct 26  1985 rollup.config.js
-rw-rw-r--  1 user user   2039 Oct 26  1985 tsconfig.json

Although I'm not sure why the src directory is included in the package.

Observed behavior

Notice all of the missing build directories (eg. action_types, actions, client etc.)

contents of node_modules/mattermost-redux@5.29.2

drwxrwxr-x  3 user user  4096 Feb 23 16:40 node_modules/
drwxrwxr-x 11 user user  4096 Feb 23 16:40 src/
-rw-rw-r--  1 user user   609 Oct 26  1985 CONTRIBUTING.md
-rw-rw-r--  1 user user 11399 Oct 26  1985 LICENSE.txt
-rw-rw-r--  1 user user 30298 Oct 26  1985 NOTICE.txt
-rw-rw-r--  1 user user  6430 Oct 26  1985 README.md
-rw-rw-r--  1 user user  2014 Oct 26  1985 SECURITY.md
-rw-rw-r--  1 user user  4661 Feb 23 16:40 package.json
-rw-rw-r--  1 user user  1394 Oct 26  1985 rollup.config.js
-rw-rw-r--  1 user user  2039 Oct 26  1985 tsconfig.json

Possible fixes

I'm not sure what the normal process that publishes the mattermost_redux package is, but it looks like it was supposed to be built first and wasn't.

mlippert avatar Feb 23 '21 21:02 mlippert

@metanerd Should I open a ticket to investigate?

amyblais avatar Feb 23 '21 23:02 amyblais

I suggest switching to a newer release version due to npm tags disallowing publishing a lower release version.

metanerd avatar Feb 24 '21 08:02 metanerd

I suggest switching to a newer release version due to npm tags disallowing publishing a lower release version.

That can't be true. You may not be able to republish a version (I'm not sure) but projects maintain multiple major releases all the time, updating 1.1.0 to 1.1.1 and at the same time having published 2.0.0 and 3.1.0 for example.

You may not think it's worth publishing 5.29.3 to fix the broken 5.29.2 and that's fine, but that npm tags won't allow it is not a good reason.

I personally just reverted to 5.29.1, however having a broken publicly published package seemed worth reporting (and I'd think it was worth fixing, but that's just me).

mlippert avatar Feb 24 '21 15:02 mlippert

Yes, you are absolutely correct in reporting it. Thank you for that! I ran into some issues before with the way we publish the package. I will however look into it again. I checked the code and the changes from 5.29.1 to 5.29.2 are regarding the migration for the build process, which caused the bug you reported: https://github.com/mattermost/mattermost-redux/compare/v5.29.1...v5.29.2?expand=1 This means using the 5.29.1 version is perfectly fine. You are completely correct that the latest version of 5.29 should not be broken and it currently is.

metanerd avatar Feb 25 '21 12:02 metanerd

Thanks @metanerd for your response and letting me know what the cause was, I really appreciate it.

mlippert avatar Feb 25 '21 16:02 mlippert