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

Npm package is corrupted #30

Closed
webmarkyn opened this issue Dec 13, 2023 · 4 comments
Closed

Npm package is corrupted #30

webmarkyn opened this issue Dec 13, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@webmarkyn
Copy link
Contributor

Hello @nerdyman. I was trying to install the new 3.1.0 version today and got the following error when trying to run the project EvalError: Code generation from strings disallowed for this context. dist/index.mjs file looks strange and contains strings with absolute paths like

var e="/Users/me/Documents/projects/nerdyman/react-image-turntable/src/hooks.ts"

When I run pnpm build I get completely different output that's not even close to the index.mjs file that I get when installing a package from npm.

NPM VERSION
Screenshot 2023-12-13 at 18 50 53

PNPM OUTPUT
Screenshot 2023-12-13 at 18 51 19

@nerdyman nerdyman self-assigned this Dec 13, 2023
@nerdyman nerdyman added the bug Something isn't working label Dec 13, 2023
@nerdyman
Copy link
Owner

Ah that's really wierd, thanks for opening this @webmarkyn. I changed some of the build config stuff in the last release so I've probably misconfigured something there. I'll take a look ASAP.

@nerdyman
Copy link
Owner

nerdyman commented Dec 14, 2023

It's the np lib used to generate releases doing this, during the "Git" or "Bumping version using npm" step it seems to run the tests even though it's configured to skip them. The tests use a different build to generate coverage so that's why the build output is borked. I'm a bit fed up with np and was already going to replace it #26 so will do that and get a working build out today.

@webmarkyn
Copy link
Contributor Author

Hello @nerdyman, have you managed to resolve it?

@nerdyman
Copy link
Owner

nerdyman commented Dec 16, 2023

Sorry for the delay @webmarkyn, this has been fixed in 3.1.1. I've tested it in a demo project and everything looks OK on unpkg too.

https://unpkg.com/browse/[email protected]/dist/index.mjs

Feel free to reopen this issue if you encounter any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants