-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
"Error: ENOENT: no such file or directory, open" when trying parcel serve --log-level 5
#2392
Comments
Not sure why this happens as cwd should normally exist? Related code: https://github.com/parcel-bundler/parcel/blob/master/packages/core/logger/src/Logger.js#L75-L80 |
I don't think the missing directories would normally exist, but I don't know how cwd() resolved them. In my example
Dumping the output of cwd() and the log file path, it seems to be a mismatch between the logfile path and the path createWriteStream is pointed to. I dumped both after line 75 and:
Maybe just pass this.logFile.path to createWriteStream or set this.logFile.path to join(cwd, filename). My tangential request was a dupe of #2288 (already merged). |
@rosensama ow now I see. The log file uses Sent with GitHawk |
To be clear I'm pretty sure ISO time strings do not include slashes (unless you are doing intervals). |
@rosensama you're right I mixed those up. Than this issue should probably be closed as it's already fixed. |
I'm getting close to the same error: $ D:\lukas\Coding\PhpstormProjects\ParcelProject\node_modules\.bin\parcel
index.html --log-level 5
[19:03:44]: Server running at http://localhost:1234
[19:03:44]: Building...
events.js:174
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open 'D:\lukas\Coding\PhpstormProjects
\ParcelProject\parcel-debug-2019-03-26T18:03:44.972Z.log'
Emitted 'error' event at:
at lazyFs.open (internal/fs/streams.js:272:12)
at FSReqWrap.args [as oncomplete] (fs.js:140:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this comm
and. I'm using Parcel |
🐛 bug report
When I try to enable log level 5 on the parcel dev server
parcel serve
I get an error.Error: ENOENT: no such file or directory, open '/Users/rosensama/projects/newproject/parcel-debug-12/10/2018@11:32:21 PM.log'
🎛 Configuration (.babelrc, package.json, cli command)
No .bablerc used. This is an Elm project (thanks for the built-in plugin!) so package.json is minimal.
The command is
parcel serve src/index.html --https --cert server/ssl.cert --key server/ssl.key --log-level 5
🤔 Expected Behavior
It should create a log file and operate as normal.
😯 Current Behavior
💁 Possible Solution
Check if directories exist and create them if needed? If I manually create parcel-debug-12/ and parcel-debug-12/10/ in ~/projects/newproject, it works.
The failed path in is my home directory and parcel is being run as me, combine that with how creating the directories helps and I'm 99% this is not a permissions problem.
It's a tangent, but I suggest removing the spaces and special characters that require escaping at a shell prompt from the file name. Look at the log file name in .npm/_logs, for example.
🔦 Context
I'm troubleshooting my application and wanted to see if the most verbose level included any helpful information, so was trying the highest log level.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: