# Version 2.4.0 published on NPM registry missing nakama-js.cjs.js file

**URL:** <https://forum.heroiclabs.com/t/version-2-4-0-published-on-npm-registry-missing-nakama-js-cjs-js-file/2709>\
**Category:** Client Libraries\
**Tags:** sdk-javascript, typescript\
**Created:** [June 4, 2022, 1:32pm UTC](https://forum.heroiclabs.com/t/version-2-4-0-published-on-npm-registry-missing-nakama-js-cjs-js-file/2709 "2022-06-04T13:32:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MWFIAE](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/mwfiae/32/678_2.png) [@MWFIAE](https://forum.heroiclabs.com/u/MWFIAE)\
**Post date:** [June 4, 2022, 1:32pm UTC](https://forum.heroiclabs.com/t/version-2-4-0-published-on-npm-registry-missing-nakama-js-cjs-js-file/2709/1 "2022-06-04T13:32:05Z")

</div>

This post is a copy from the following issue:

> <https://github.com/heroiclabs/nakama-js/issues/129>
>
> After upgrading to 2.4.0 I started receiving an error that the nakama-js package… could not be resolved because it was missing one of the build files.
> 
> \`\`\`
> error While trying to resolve module '@heroiclabs/nakama-js' from file, the package 
> 'node\_modules/@heroiclabs/nakama-js/package.json' was successfully found. 
> However, this package itself specifies a 'main' module field that could not be resolved 
> ('node\_modules/@heroiclabs/nakama-js/dist/nakama-js.cjs.js').
> \`\`\`
> 
> Comparing the 2.3.0 package to the 2.4.0 package it does look like the file is missing, and adding the file from the repo fixed the issue. I assume this is just a publishing error.

After upgrading to 2.4.0 I started receiving an error that the nakama-js package could not be resolved because it was missing one of the build files.

```auto
error While trying to resolve module '@heroiclabs/nakama-js' from file, the package 
'node_modules/@heroiclabs/nakama-js/package.json' was successfully found. 
However, this package itself specifies a 'main' module field that could not be resolved 
('node_modules/@heroiclabs/nakama-js/dist/nakama-js.cjs.js').

```

Comparing the 2.3.0 package to the 2.4.0 package it does look like the file is missing, and adding the file from the repo fixed the issue. I assume this is just a publishing error.

---

<div class="post-metadata">

**Author:** ![ftkg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/ftkg/32/1180_2.png) [@ftkg](https://forum.heroiclabs.com/u/ftkg)\
**Post date:** [June 6, 2022, 1:26pm UTC](https://forum.heroiclabs.com/t/version-2-4-0-published-on-npm-registry-missing-nakama-js-cjs-js-file/2709/2 "2022-06-06T13:26:39Z")

</div>

Thank you @MWFIAE, this is being tracked by our team on GitHub.

---

<div class="post-metadata">

**Author:** ![ftkg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/ftkg/32/1180_2.png) [@ftkg](https://forum.heroiclabs.com/u/ftkg)\
**Post date:** [June 6, 2022, 1:26pm UTC](https://forum.heroiclabs.com/t/version-2-4-0-published-on-npm-registry-missing-nakama-js-cjs-js-file/2709/3 "2022-06-06T13:26:46Z")

</div>


