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

Cannot find module './preprocess.js' #81

Closed
colehpage opened this issue Sep 19, 2021 · 13 comments · Fixed by #84
Closed

Cannot find module './preprocess.js' #81

colehpage opened this issue Sep 19, 2021 · 13 comments · Fixed by #84
Assignees
Labels
bug Something isn't working

Comments

@colehpage
Copy link

colehpage commented Sep 19, 2021

First off @mihar-22 @benmccann Thanks for the quick release of 2.1.3! And everyone else who got that through - much appreciated with the quick turnaround. This might be something obvious I'm missing but while the transform export issue has been solved I'm now getting an issue with the preprocess.js file which doesn't seem to exist or be copied into dist. I see that #71 added the command to copy to dist from src/preprocess.js but I'm not seeing it in the final build.

Is there something I need to make sure I'm doing to make this work? I know it's been noted that the fixes for 2.1.3 had been tested in a few places and were working so guessing it's something on my end. Any nudge in the right direction would be great. Thanks!

@benmccann
Copy link
Collaborator

It shows up for me in dist/ when I build locally. @mihar-22 maybe you accidentally published an old version or something?

@colehpage note that it's only the CJS version that needs that file. If you switch to ESM you'll avoid that issue and get better performance

@colehpage
Copy link
Author

Ahh that makes sense - thanks for the tip @benmccann ill give that a go then, was meaning to go the ESM route anyway, should have tried that first.

@sebastianrothe
Copy link
Collaborator

sebastianrothe commented Sep 19, 2021

It shows up for me in dist/ when I build locally. @mihar-22 maybe you accidentally published an old version or something?

@colehpage note that it's only the CJS version that needs that file. If you switch to ESM you'll avoid that issue and get better performance

Yeah, it is missing in the published version. @mihar-22

Weird though, because release should call build. Does it need to be added to the files property here https://github.com/mihar-22/svelte-jester/blob/master/package.json#L38?

@sebastianrothe sebastianrothe added the bug Something isn't working label Sep 19, 2021
@enjoythelive1
Copy link

enjoythelive1 commented Sep 20, 2021

Rollup does not transform preprocess, so that is also a reason it is missing.

@sebastianrothe
Copy link
Collaborator

Rollup does not transform preprocess, so that is also a reason it is missing.

It is copied there during npm run build (https://github.com/mihar-22/svelte-jester/blob/master/package.json#L43)

@mihar-22
Copy link
Collaborator

There wasn't a build step before and it wasn't added to the release command so I didn't realize it was required. Fixed in 2.1.4!

@colehpage
Copy link
Author

colehpage commented Sep 21, 2021

There wasn't a build step before and it wasn't added to the release command so I didn't realize it was required. Fixed in 2.1.4!

Thanks mate! Really appreciate the work on all this and especially the quick responses, it's a huge help. EDIT: I'm not sure if it's fixed in 2.1.4 I don't see preprocess.js being added in dist/ during the build yet, but I may just be tired so I'll take a look in the morning

@asode
Copy link

asode commented Sep 21, 2021

Thank you for the quick release, but I think @colehpage is right: preprocess.js seems to be still missing in 2.1.4.

@sebastianrothe
Copy link
Collaborator

There wasn't a build step before and it wasn't added to the release command so I didn't realize it was required. Fixed in 2.1.4!

Thanks mate! Really appreciate the work on all this and especially the quick responses, it's a huge help. EDIT: I'm not sure if it's fixed in 2.1.4 I don't see preprocess.js being added in dist/ during the build yet, but I may just be tired so I'll take a look in the morning

Here https://github.com/mihar-22/svelte-jester/blob/master/package.json#L43

@ritchieanesco
Copy link

yep also can confirm preprocess is still missing in 2.1.4. @mihar-22

@sebastianrothe
Copy link
Collaborator

According to https://docs.npmjs.com/cli/v7/commands/npm-publish#files-included-in-package, we need to add it to the files property.

@hyochan
Copy link

hyochan commented Sep 21, 2021

Just reproduced in CI.

Downgrading to 1.7 works fine.

@benmccann
Copy link
Collaborator

This was just fixed in #84 and should work when version 2.1.5 is released

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

Successfully merging a pull request may close this issue.

8 participants