Skip to content

[Bug]: 3.5.2 missing dist/ folder on npm #205

Description

@alex-pol

What happened?

react-onesignal@3.5.2 was published to npm without the dist/ folder. The tarball contains only 3 files (LICENSE, package.json, README.md, ~12.5 KB), but package.json points to dist/index.js, dist/index.cjs, and dist/index.d.ts. After install, the package cannot be imported — the build/runtime fails because those entry files are missing. Version 3.5.1 works correctly and includes all 9 files (~146 KB), including the full dist/ directory.

What browsers are you seeing the problem on?

Other

What operating system are you running?

any

Steps to reproduce?

1. Create a new project (or use an existing one).
2. Install the latest version:
`npm install react-onesignal@3.5.2`
3. Check the installed package contents:
`ls node_modules/react-onesignal/`
Result: only LICENSE, README.md, and package.json — no dist/ folder.
4. Try to import the package:
`import OneSignal from 'react-onesignal';`
5. Run the build/dev server (e.g. Vite/Webpack).
The build fails with a module resolution error (e.g. Failed to resolve entry for package "react-onesignal" or ENOENT: no such file or directory ... dist/index.js).

What did you expect to happen?

Installing react-onesignal@3.5.2 should include the compiled artifacts listed in package.json:

  • dist/index.js
  • dist/index.cjs
  • dist/index.d.ts

The package should be importable and usable, same as 3.5.1. It looks like the publish step ran without building first (possibly related to the vite-plus migration in 3.5.2), so dist/ was never included in the npm tarball.

Relevant log output

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions