Constant error when writing in files in create-react-app based project in WebStorm - ide

I am constantly getting an error from babylon.js (which I'm not sure I'm even using?) in my "Run" terminal in WebStorm.
I get the following error:
cmd.exe /D /C call C:/Users/Jens/IdeaProjects/Vaskemaskine/WashingmachineFrontend/vaskemaskine-app/node_modules/babel-core/node_modules/.bin/babylon.cmd --source-maps --out-file strings-compiled.js --presets es2015 C:\Users\Jens\IdeaProjects\Vaskemaskine\WashingmachineFrontend\vaskemaskine-app\src\strings.js
fs.js:549
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open 'C:\Users\Jens\IdeaProjects\Vaskemaskine\WashingmachineFrontend\vaskemaskine-app\src\--source-maps'
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at Object.<anonymous> (C:\Users\Jens\IdeaProjects\Vaskemaskine\WashingmachineFrontend\vaskemaskine-app\node_modules\babel-core\node_modules\babylon\bin\babylon.js:13:15)
Occasionally I will also get an error in a popup in WebStorm:
Cannot save C:\Users\Jens\IdeaProjects\Vaskemaskine\WashingmachineFrontend\vaskemaskine-app\src\strings.js.
The file left unchanged.
Your changes were written to strings.js___jb_tmp___.
Not sure if that is related or not.
I tried googling around, but no one seems to be having the same problem as me. Anyone has a clue about what is going on? I haven't configured the scripts delivered with create-react-app, other than "ejecting" out.

Related

Lynis wont work, 'error: Unknown option 'ssl-certificate-paths-to-ignore' found (with value: /etc/letsencrypt/archive:)

How do I correct/get rid of the following error? It prevents me from executing any lynis commands.
Output of "Sudo lynis show version" or any lynis command:
"Error: Unknown option 'ssl-certificate-paths-to-ignore' found (with value: /etc/letsencrypt/archive:)".
Background: Installed lynis, but couldn't figure out how to use it - got stuck on changing the parameters following a guide. Tried using another guide (https://adamtheautomator.com/lynis/), which included installing lynis again, and got this error
Tried purging and removing lynis, but got this error again after reinstalling, because thought the error had occured when I had first tried to install and configure lynis.
During the purge got:
"Purging configuration files for lynis (3.0.8-100) ...
dpkg: warning: while removing lynis, directory '/etc/lynis' not empty so not removed
Purging configuration files for menu (2.1.47ubuntu4) ...".

EPERM: operation not permitted, stat 'C:\$Recycle.Bin\desktop.ini'

trying to build a react app with vite(npm run build) but this appears.
cleaned cashe and reinstalled npm a couple times with vs code closedbut still doesnt work. tried using the command as administator in the terminal but still the error appears and some random files from the C: appeared in the outDir folder like bootmgr (not the real one, it onlt appeard in vs code and deleting it didnt do anything and the real bootmgr is still in C:)
EPERM: operation not permitted, stat 'C:$Recycle.Bin\desktop.ini'
error during build:
Error: EPERM: operation not permitted, stat 'C:$Recycle.Bin\desktop.ini'
at Object.statSync (node:fs:1551:3)
at copyDir (C:\Users\HP\Desktop\XalinPaintWeb\XalinPaint\node_modules\vite\dist\node\chunks\dep-59dc6e00.js:2553:34)
at copyDir (C:\Users\HP\Desktop\XalinPaintWeb\XalinPaint\node_modules\vite\dist\node\chunks\dep-59dc6e00.js:2555:13)
at prepareOutDir (C:\Users\HP\Desktop\XalinPaintWeb\XalinPaint\node_modules\vite\dist\node\chunks\dep-59dc6e00.js:41439:9)
at doBuild (C:\Users\HP\Desktop\XalinPaintWeb\XalinPaint\node_modules\vite\dist\node\chunks\dep-59dc6e00.js:41408:13)
at async build (C:\Users\HP\Desktop\XalinPaintWeb\XalinPaint\node_modules\vite\dist\node\chunks\dep-59dc6e00.js:41244:16)
at async CAC. (C:\Users\HP\Desktop\XalinPaintWeb\XalinPaint\node_modules\vite\dist\node\cli.js:738:9)
the value in the public dir in the vite config was "/src" and it tried to get the value not from the relative location like location/src but C:/src

SOLVED: `gatsby develop` yields Error: EISDIR: illegal operation on a directory, readlink on the .cache folder

Solution
My HDD is formatted as exFat which doen'nt seem to support the readlink operation.
I am trying to set up a gatsby page via the gatsby CLI. The 'gatsby new' wokrs and set's up everything nicely, as far as I can tell. When it comes to starting the develop server I get the Error like in the title: "Error: EISDIR: illegal operation on a directory, readlink './path/on/my/hdd/.cache'
I learned, that "EISDIR means that the target of the operation is a directory in reality but that the expected filetype of the target is something other than a directory." (Using Node.js I get, "Error: EISDIR, read").
What drives me mad is, that a file called .cache wouldn't make much sense, so somewhere deep down in this gatsby jungle has to be something, that gets messed up.
I've tryed node Versions 10.16.0 and 12.2.0 managed via nvm on windows 10. I've tryed different Folders and Harddrives, I've force cleared my node cache, I've tryed different starter packages, I've tryed npm update on the node_modules installed via gatsby.
PS > gatsby develop
success open and validate gatsby-configs - 0.075 s
success load plugins - 9.615 s
success onPreInit - 0.003 s
success initialize cache - 0.074 s
ERROR
Unable to copy site files to .cache EISDIR: illegal operation on a directory, readlink 'C:\my-gatsby-website\.cache'

MSBuild: error MSB3073 The command 'setlocal VCEnd' exited with code 1

I am trying to build an opensource project on my machine using Visual Studio 2015 and CMake. I have followed all the steps and the prebuild checks were running properly. But when I am building the INSTALL to install the software in the folder that I have specified in the CMAKE gui, I am getting the MSB3073 error. A full description of the error is as below.
Severity Code Description Project File Line Suppression State Error
MSB3073 The command "setlocal
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DBUILD_TYPE=RelWithDebInfo -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1.
INSTALL C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets 133
I have searched for the same error and found that some people who tried to install the build in a directory without write privileges encountered this, but I have made sure that I have write access. I have even tried do this with admin rights and still not able to fix this issue.
Any help in this would be highly appreciated.
While running Visual Studio 2022, trying to build VST plug-in with code generated by cmake.
For me it showed permission access denied when creating a symbolic link.
All I had to do was run Visual Studio "As Administrator" and it worked.
Of course, you have to have Admin privileges to your machine, or you belong to a group that is allowed to "Create symbolic links" in the Local Group Policy Editor (https://developer.steinberg.help/display/VST/Preparation+on+Windows)
Sorry for being a necro but I just encountered and fixed the exact same issue, and I think it can save someone some time if I share my solution.
By looking a bit in the log before the error message, I found the last element that CMake was trying to install :
-- Installing: path-to-anaconda/anaconda3/Lib/site-packages/cv2.cp37-win_amd64.pyd
CMake Error at modules/python3/cmake_install.cmake:45 (file):
file INSTALL cannot copy file
"path-to-repo/opencv/build/lib/python3/Release/cv2.cp37-win_amd64.pyd" to
"path-to-anaconda/anaconda3/Lib/site-packages/cv2.cp37-win_amd64.pyd":
Permission denied.
Call Stack (most recent call first):
modules/cmake_install.cmake:183 (include)
cmake_install.cmake:124 (include)
Permission denied...
It was simply because I left a console with cv2 imported, so the pyd was still being used and blocked the install. This can probably extend to any other file (DLLs, .hpp) being installed, just look a bit above this obscure error message ! Nothing to do with cmake_install.cmake, at least for me.
There was an error in one of the cmake_install.cmake files and it was causing the issue. Once I fixed the issue, it worked.

show error line and file when compile coffeeify

How to make browserify show error line and file on compile:
browserify -t coffeeify mainPage_browserify.coffee > main.js -d
The current output don't give this information. So it is hard to debug:
⏎
Error: Cannot find module 'throw' from '/allProjectsPath/project/public/javascripts/map'
at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:50:17
at process (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:119:43)
at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:128:21
at load (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:60:43)
at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:66:22
at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:21:47
at Object.oncomplete (fs.js:107:15)
❯ browserify --version ⏎
5.12.1
I was interested in this by myself, so I had a quick peek into source code and run debugger. It looks like that errors from transforms are basically swallowed when using command line browserify.
Errors from coffeeify are passed using event emitter on the stream...
https://github.com/substack/coffeeify/blob/master/index.js#L35
These are handled by Browserify only if the bundle call was made with callback present...
https://github.com/substack/node-browserify/blob/master/index.js#L619
Unfortunately callback is not passed when running the command line...
https://github.com/substack/node-browserify/blob/master/bin/cmd.js#L55