Program 'npx.cmd' failed to run - javascript

I'm trying to create a JS app using the VSCode Terminal. To do so, I'm typing in the following: npx #knowledgehut/create-js-app my-blog but I get the following error as a result:
ResourceUnavailable: Program 'npx.cmd' failed to run: An error occurred trying to start process 'C:\Program Files\nodejs\npx.cmd' with working directory 'C:\Users\belen'. The system cannot find the file specified.At line:1 char:1
npx #knowledgehut/create-js-app my-blog`
I have already unistalled an reinstalled VSCode and same with Node.js. I have of course restarted my computer because sometimes that does the trick but nothing worked.
VS Code version: Code 1.69.2 (3b889b0, 2022-07-18T16:12:52.460Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No

Related

Electron fails to install on CI

After we migrated to Electron v11 for our project from v6, we started experiencing weird CI issues, where Electron did not install properly and the pipeline failed.
Our setup:
Lerna
Monorepo
Yarn v1.22
Private npm registry
Example of such issues:
[4/4] Building fresh packages...
error /builds/xxxx/..../node_modules/electron, /builds/.../node_modules/electron, /builds/xxxx/app/node_modules/electron: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /builds/xxxx/features/yyyy/node_modules/electron
Output:
Error: dest already exists.
at /builds/xxxx/node_modules/fs-extra/lib/move/move.js:41:31
Exit code: 1
Command: node install.js
Arguments:
Directory: C:\gitlab\builds\pFMTxHs3\0\xxxxxx\features\yyyyy\node_modules\electron
Output:
C:\gitlab\builds\pFMTxHs3\0\xxxx\features\yyyyy\node_modules\electron\install.js:51
throw err
^
[Error: ENOENT: no such file or directory, open 'C:\Users\xxxx\AppData\Local\electron\Cache\httpsgithub.comelectronelectronreleasesdownloadv7.1.4electron-v7.1.4-win32-x64.zip\electron-v7.1.4-win32-x64.zip'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Users\\xxxx\\AppData\\Local\\electron\\Cache\\httpsgithub.comelectronelectronreleasesdownloadv7.1.4electron-v7.1.4-win32-x64.zip\\electron-v7.1.4-win32-x64.zip'
We tried deleting CI caches, Yarn caches, NPM caches all of that worked inconsistently. Sometimes we would have successful pipelines, sometimes not.
After a couple of months battling with this ghost, we had another error 5xx upon trying to download electron. It suddenly stopped downloading everywhere local machines and CI.
After getting in touch with the Electron team I discovered the problem.
We had a very old .npmrc config, which was no longer valid.
It contained this:
disturl=https://atom.io/download/electron
When I've changed the line into this:
disturl=https://electronjs.org/headers
All of our pain was gone - our builds became stable again.
Big thanks to the electron community!

build failed react-native 0.6.5 We ran "xcodebuild" command but it exited with error code 65

I'm having this problem "error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening starter.xcodeproj. Run CLI with --verbose flag for more details." since I pulled the latest update from the other colleague, I can't run the project in my simulator, but my colleagues side works fine.
I've tried to change the build system to legacy build system.
Clone the project again.
remove the build folder under iOS folder, and run again.
remove the node module folder and run again.
I have tested in different device is not working too.
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening starter.xcodeproj. Run CLI with --verbose flag for more details.
User defaults from command line:
IDEDerivedDataPathOverride = /Users/nexplatform/Desktop/padini scm mobile/SCM/ios/build/starter
brew install cocoapods
cd projectfolder/ios
pod install
and
cd..
react-native run-ios

React native can't run in ios by command but it can run in Xcode?

I used two libraries: "native-base" and "react-native-elements" but when I used it, I could not use the command react-native run-ios. But when I open the Xcode project, it can run and work as well.
This is my error below when I try to use the command react-native run-ios:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening DesignComponents.xcodeproj
One more error:
The following build commands failed:
Analyze /Users/my_path_project/node_modules/react-native/React/Base/RCTAssert.m normal x86_64
(1 failure)
I try to resolve it by clean cache, clean folder node_modules and something that I can, but it's not working.

vscode-ripgrep not getting installed in VSCode build/run process

I was trying to build and run VSCode on my Ubuntu 17.10 using the following guide: https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run
When I tried to install dependencies using yarn, it is giving me the following error:
error /home/dhairyakhale/git/vscode/node_modules/vscode-ripgrep: Command failed.
Exit code: 1
Command: node ./lib/postinstall.js
Arguments:
Directory: /home/dhairyakhale/git/vscode/node_modules/vscode-ripgrep
Output:
Unzipping to /home/dhairyakhale/git/vscode/node_modules/vscode-ripgrep/bin
And then it stops the process. How do I proceed?
I have a similar issue while installing Theia. The broken vscode-ripgrep installation caused it. Here is the ticket I submitted to vscode-ripgrep.
https://github.com/roblourens/vscode-ripgrep/issues/15

node: relocation error: node: symbol SSL_set_cert_cb, version libssl.so.10 not defined in file libssl.so.10 with link time reference

I've been running a NodeJS server for a website using the MEAN stack for a website, and it's been running for a few months. When I started to work on it again this morning, I started up the website with:
nodemon server/app.js
The express server starts up just fine, but as soon as I connect to it with my browser, I get the following error:
node: relocation error: node: symbol SSL_set_cert_cb, version libssl.so.10 not defined in file libssl.so.10 with link time reference
[nodemon] failed to start process, "node" exec not found`
And when I do node server/app.js, I get the same node: relocation error..., but dont' get the ...failed to start process...
I don't think it is with any changes I made in the past few days, because I went to another server where this was running on (where the code was a few weeks old), and I restarted the nodejs process, and then it broke when I accessed the site.
npm version: 3.10.10,
node version: 6.11.3,
CentOS Linux release 7.3.1611
I had same issue with a ursa module that on the same environment.
Npm rebuild has the following error when my openssl version is 1.0.1e
node-gyp: relocation error: node-gyp: symbol SSL_set_cert_cb, version libssl.so.10 not defined in file libssl.so.10 with link time reference
I updated openssl with yum update openssl to 1.0.2k, then npm rebuild no longer has that error.
Run: $yum update if nothing works

Categories