-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fatal error When running npm test on fresh github clone #6038
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
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you! |
Can we get the node.js and npm version you have? |
I am facing the same problem. |
@aditya-shrivastavv Can you share the npm version as well? The OS version could be helpful too. |
npm version = 9.3.1 OS version- Another problem I am having is with prettier, The problem is so annoying that I had to disable prettier. When I save the file so many changes happens. function foo() {
}
// turns to
function foo () { // gap inserted
}
const obj = {
prop1: value1,
prop2: value2
}
// turns to
const obj = {
prop1: value1,
prop2: value2, // comma automatically inserted
} and so many changes like this |
@all-contributors please add @monmon2003 for code |
I've put up a pull request to add @monmon2003! 🎉 |
@aditya-shrivastavv I can't fully replicate, if you can find out a bit more why that's happening it would be great. We do not use prettier for the formatting of p5.js and I don't recommend the use of prettier here. @monmon2003 I don't think that is relevant here and for p5.js we will enfore unix line endings instead of windows line endings. You should either set your text editor to use unix line endings, auto detect file line endings, or use the editorconfig plugin. |
We should remove the prettierrc file, I probably forgot last time, but the prettier dependency has already been removed from the project. |
Yes @limzykenneth , that will be very helpful 😊 |
@limzykenneth Okay I will try using the editorconfig plugin. |
|
@aditya-shrivastavv There should be no global dependency required. If you have access to another machine, try building and testing on it, if it passes, we can start to compare the two. |
Having one more question, Is this happening to all of the windows machines? And also I found an old issue and their solution seem exactly like this. It's not working for me but it's not enough I think some of you guys should also try this. |
I'm also using Windows, ran into this same issue, and found @limzykenneth's comment on another issue about the EOL used in utils/sample-linter.js. So I changed line 1: import { EOL } from 'os'; To: const EOL = '\n'; And that fixed it for me! Would it make sense to change that in sample-linter.js for everyone? |
@calebfoss I think it would make sense to do so, especially if that would solve this issue. Do go ahead with a PR if you like. |
Replace os import to always use '\n' for EOL - resolves #6038
Most appropriate sub-area of p5.js?
p5.js version
No response
Web browser and version
No response
Operating System
Windows
Steps to reproduce this
While setting up p5.js locally i am getting this error. whn i press command npm test after npm ci.
Snippet:
Running "eslint-samples:source" (eslint-samples) task
Fatal error: Cannot read properties of undefined (reading 'prefixLength')
The text was updated successfully, but these errors were encountered: