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

Unable to start project due to typos in filenames and incorrect line endings #418

Closed
michalvarys opened this issue Dec 27, 2023 · 4 comments

Comments

@michalvarys
Copy link

Following imports doesn't match the filenames CouponValidator DiscountCalculator

const { validateCoupon } = require('./services/couponValidator');
const { calculateDiscount } = require('./services/discountCalculator');

-const { validateCoupon } = require('./services/couponValidator');
-const { calculateDiscount } = require('./services/discountCalculator');
+const { validateCoupon } = require("./services/CouponValidator");
+const { calculateDiscount } = require("./services/DiscountCalculator");

CRLF line ending for the file evershop causes an error

$ evershop dev
/usr/bin/env: ‘node\r’: No such file or directory
error Command failed with exit code 127.

It starts working after manually changing the line ending to LF

Ubuntu 20.04.5 LTS;
NPM 9.8.1;

@treoden
Copy link
Collaborator

treoden commented Dec 28, 2023

Hi @michalvarys ,

Yeah, with the latest release, the name of those 2 files changed (camel cases). I think your git was not case sensitive and it does not update the file name in this case.

@claudiolor
Copy link
Contributor

Hi @treoden,

I faced the same issue with importing the CouponValidator and DiscountCalculator modules also creating a project via npx.

Looking at these files in the Github repository it looks like they still have the Pascal case naming, so probably they still need to be renamed.

@tiberiuichim tiberiuichim mentioned this issue Jan 2, 2024
10 tasks
@tiberiuichim
Copy link
Contributor

I created a PR for this. I find the notion of seeing this sort of issue in a release of Evershop a bit troubling and makes me raise the question: is this project right for me?

@treoden
Copy link
Collaborator

treoden commented Jan 2, 2024

Hi,

That was a stupid mistake from me. Thanks for the PR @tiberiuichim

@treoden treoden closed this as completed Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants