Running this command trying to install extension into the remote WSL distro, executing from within a vscode remote terminal window.
Using this as my guide: https://github.com/microsoft/vscode-remote-release/issues/2589
result:
(user) environment ->code --install-extension vscjava.vscode-java-pack --force
Unable to connect to VS Code server: Error in request.
Error: connect EACCES /mnt/wslg/runtime-dir/vscode-ipc-c884c8be-d4c3-4673-895d-71665802af9a.sock
at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
errno: -13,
code: 'EACCES',
syscall: 'connect',
address: '/mnt/wslg/runtime-dir/vscode-ipc-c884c8be-d4c3-4673-895d-71665802af9a.sock'
}
(user) environment ->sudo code --install-extension vscjava.vscode-java-pack --force
sudo: code: command not found
(user) environment ->which code
/home/user/.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164/bin/remote-cli/code
(user) environment ->sudo /home/user/.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164/bin/remote-cli/code --install-extension vscjava.vscode-java-pack
Command is only available in WSL or inside a Visual Studio Code terminal.
(user) environment ->sudo /home/user/.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164/bin/remote-cli/code --install-extension vscjava.vscode-java-pack --force
Command is only available in WSL or inside a Visual Studio Code terminal.
(user) environment ->
Any help greatly appreciated.
Thanks
Related
I am trying to build the next Js app production files to deploy it on cPanel, when I execute
npm run dev the app is working just fine but as I start to build a production file with the help of this video(https://youtu.be/1ykSXau838c) and executes npm run build it gives me an error in the terminal as given below:
PS C:\Users\hp\Desktop\reactJs-project\NextJs\test-app> npm run build
> test-app#0.1.0 build
> next build
info - Checking validity of types
info - Creating an optimized production build .node:events:368
throw er; // Unhandled 'error' event
^
Error: EPERM: operation not permitted, open 'C:\Users\hp\Desktop\reactJs-project\NextJs\test-app\.next\trace'
Emitted 'error' event on WriteStream instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4048,
code: 'EPERM',
syscall: 'open',
path: 'C:\\Users\\hp\\Desktop\\reactJs-project\\NextJs\\test-app\\.next\\trace'
}
so I just want to know is there any way to solve this problem?
Posting comment from Koronag as an answer (as it helped me with this error and seems the most likely cause)...
This error is commonly seen when running a build while the dev server is already running. (E.g. in my case, I had a local build running via npm run dev and was trying to commit/push code, which invoked a Git Hook that also runs npm run dev.)
For me, it works fine this answer drives me to the resolver.
I run 2 scripts in terminals:
once for development
another for the build process.
So after killing the development script it looks perfectly fine!
From next-sitemap repo README.md
"Having next-sitemap command & next-sitemap.js file may result in file opening instead of building sitemaps in windows machines.
As a solution to this, it is now possible to use a custom config file instead of next-sitemap.js. Just pass --config .js to build command."
Next-Sitemap README.md - Building Sitemaps
The above worked for me
I'm trying run my project on android. But I get an error like that.
C:\Users\Alperen\Desktop\AwesomeProject>npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 864 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Installing the app...
ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
at checkExecSyncError (child_process.js:621:11)
at execFileSync (child_process.js:639:15)
at runOnAllDevices (C:\Users\Alperen\Desktop\AwesomeProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at buildAndRun (C:\Users\Alperen\Desktop\AwesomeProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\Users\Alperen\Desktop\AwesomeProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async Command.handleAction (C:\Users\Alperen\Desktop\AwesomeProject\node_modules\react-native\node_modules\#react-native-community\cli\build\index.js:164:9)
I don't understand. What should I do ?
The Yarn install failed to download Chromium. Error is as follows:
D:\workspace\www\ant-design-mobile-pro
λ yarn
yarn install v1.12.3
//...
Directory: D:\\workspace\\www\\ant-design-mobile-pro\\node_modules\\puppeteer
Output:
ERROR: Failed to download Chromium r599821! Set \"PUPPETEER_SKIP_CHROMIUM_DOWNLOAD\" env variable to skip download.
{ Error: connect ETIMEDOUT 172.217.161.176:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
address: '172.217.161.176',
success Saved lockfile.
Done in 343.80s.
Question:
Can I download Chromium manually? I can download it from https://npm.taobao.org/mirrors/chromium-browser-snapshots/Win_x64/,the question is: Where should I put it after dowloading it?
If you don't intend to run the automated browser tests which depend upon Chromium, you can skip the install per the error message:
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true && yarn
I've occasionally encountered this yarn install timeout recently as well, and no cache clear or other manipulation has seemed to resolve it.
I am facing a problem when starting webdriver-manager in node_modules\protractor with windows 7. the command is :
node webdriver-manager start
Then I got the following error messages:
seleniumProcess.pid: undefined
events.js:85
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at exports._errnoException (util.js:742:11)
at Process.ChildProcess._handle.onexit (child_process.js:1028:32)
at child_process.js:1109:20
at process._tickCallback (node.js:343:11)
at Function.Module.runMain (module.js:492:11)
at startup (node.js:124:16)
at node.js:807:3
After searching on the Internet, I cannot find any similar question like mine that the seleniumProcess.pid is undefined.
Following is the output for java -version:
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
Any idea?
Ok, I figured out why I had this problem. You have only JRE, but
You will need to have the Java Development Kit (JDK) installed to run
the standalone Selenium Server. Check this by running java -version
from the command line. Tutorial
On Ubuntu I've done
$ sudo apt-get install openjdk-7-jdk
And now I have this Java:
$ java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.15.10.1)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
And webdriver-manager start works.
Error:
C:\XXXX\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriv
er-manager\bin>webdriver-manager --verbose update
events.js:160
throw er; // Unhandled 'error' event
^
Error: unable to verify the first certificate
at Error (native)
at TLSSocket. (_tls_wrap.js:1092:38)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:185:7)
at TLSSocket._finishInit (_tls_wrap.js:610:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)
I did the following to remove this:
Try:
1. C:\XX\Roaming\npm\node_modules\protractor\node_modules\webdriv
er-manager\bin>webdriver-manager --proxy http://username:passwd#IP:port
080/ update
(Then it updated drivers in the location)
webdriver-manager status
C:\XX\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\bin>webdriver-manager --verbose start
It is started working,
I expect this is happening repeatedly due to corruption of drivers. May we need to graceful stop to work.
Try to add C:\Windows\System32\ there (right-click My Computer -> Properties -> Advanced system settings -> Environment Variables -> Edit... PATH and add C:\Windows\System32 to the end (with a semi-colon separating each variable).
I'm trying to connect to a database on Azure using node-mssql. My development system is Windows 7 and I have had no success at all getting node-sqlserver to install via WebMatrix.
My question is two part: Firstly is there any reason that even when I follow the instructions from Microsoft that I get errors with node-sqlserver? Trying the naive approach using NPM inside WebMatrix I get the following error:
An error occurred.
"C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-sqlserver" "--json"
Exit status 1
Failed at the node-sqlserver#0.1.0 install script.
This is most likely a problem with the node-sqlserver package,
not with npm itself.
Tell the author that this fails on your system:
node-gyp rebuild
You can get their info via:
npm owner ls node-sqlserver
There is likely additional logging output above.
Failed: npm reported an error.
NodeNpm.NpmException: Failed: npm reported an error.
at NodeNpm.NpmApi.Install(INpmPackage package)
at Microsoft.WebMatrix.NpmGallery.CachingPackageManger.InstallPackage(INpmPackage package)
at Microsoft.WebMatrix.NpmGallery.PackageViewModel.Install()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
The machine has VS2012 Professional installed.
The second part of my question is, is there any reason why using node-mssql won't work under Azure? I simply get a failed connection error, even though I've verified the details several times (substituted placeholders for actual values below):
var config = {
user: '{username}',
password: '{password}',
server: 'tcp:{server}.database.windows.net',
database: '{database}'
}
I get the following error:
{"name":"ConnectionError","message":"connection to tcp:{server}.database.windows.net:1433 >- failed Error: getaddrinfo ENOTFOUND"}
I realise that node-sqlserver is the best way to do it under Azure but I've tried for a couple of days with no success. Is there anything obvious I am missing?
1) You can solve it by downloading precompiled node-sqlserver driver from this repo. I was not able to compile sources on my machine even with all dev dependencies installed as well.
2) node-mssql module use three different drivers to communicate with sql server. Your config doesn't specify any driver, so the default one is used - Tedious. You must change your config to make it work correctly:
var config = {
user: '{username}',
password: '{password}',
server: '{server}.database.windows.net', // simply remove "tcp:"
database: '{database}'
}
There is also an option to use node-mssql with node-sqlserver but to make it work, you have to install compiled node-sqlserver driver manually. Config should look like this:
var config = {
driver: 'msnodesql',
user: '{username}',
password: '{password}',
server: 'tcp:{server}.database.windows.net',
database: '{database}'
}
I was using SQL Azure from Node.js last year when the module was named node-sqlserver so my answer might not work.
Ref your first problem, node-mssql should need to be compiled through node-gyp and C++ during NPM installation. So you'd better check if you have C++ compiler installed. When I was installing it told me I need VS2010 C++. Not sure if you need it now, or any later version. You can run npm install node-mssql from command window and you should get a log file if it failed, should be npm-error.log or something similar.
Ref your second problem, when I was using this module I use connection string. Could you double check your username was specified in format user#server. Also double check if your SQL Azure firewall was opened for other cloud services.