Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 5.10.16.3-microsoft-standard-WSL2 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

This message is shown once a day. To disable it please create the
/home/nikhil/.hushlogin file.
nikhil@N:~$ curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
[sudo] password for nikhil:
12Sorry, try again.
[sudo] password for nikhil:
2024-09-29 01:41:30 - Installing pre-requisites
Hit:2 https://deb.nodesource.com/node_18.x nodistro InRelease
Get:3 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Hit:1 https://packages.microsoft.com/repos/code stable InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:5 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
Hit:6 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [2066 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1128 kB]
Fetched 3451 kB in 12s (290 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ca-certificates is already the newest version (20240203~22.04.1).
curl is already the newest version (7.81.0-1ubuntu1.18).
gnupg is already the newest version (2.2.27-3ubuntu2.1).
apt-transport-https is already the newest version (2.4.13).
The following packages were automatically installed and are no longer required:
  javascript-common libc-ares2 libjs-highlight.js libnode72 nodejs-doc
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 147 not upgraded.
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:4 https://deb.nodesource.com/node_18.x nodistro InRelease
Hit:5 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:1 https://packages.microsoft.com/repos/code stable InRelease
Reading package lists... Done
2024-09-29 01:41:47 - Repository configured successfully.
2024-09-29 01:41:47 - To install Node.js, run: apt-get install nodejs -y
2024-09-29 01:41:47 - You can use N|solid Runtime as a node.js alternative
2024-09-29 01:41:47 - To install N|solid Runtime, run: apt-get install nsolid -y

nikhil@N:~$ node -v
Command 'node' not found, but can be installed with:
sudo apt install nodejs
nikhil@N:~$ npm -v
10.8.3
nikhil@N:~$ npx create vite
(node:15008) [DEP0170] DeprecationWarning: The URL http://Nikhil:192004@host:port is invalid. Future versions of Node.js will throw an error.
(Use `node --trace-deprecation ...` to show where the warning was created)
npm error code ERR_INVALID_URL
npm error Invalid URL
npm error A complete log of this run can be found in: C:\Users\Nikhil\AppData\Local\npm-cache\_logs\2024-09-28T20_12_17_824Z-debug-0.log
nikhil@N:~$ cke===== apt-get install nodejs -y
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
nikhil@N:~$  apt-get install nodejs -y
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
nikhil@N:~$ sudo  apt-get install nodejs -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  javascript-common libc-ares2 libjs-highlight.js libnode72
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  nodejs-doc
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 1 to remove and 147 not upgraded.
Need to get 29.6 MB of archives.
After this operation, 178 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_18.x nodistro/main amd64 nodejs amd64 18.20.4-1nodesource1 [29.6 MB]
Fetched 29.6 MB in 1min 18s (380 kB/s)
(Reading database ... 47603 files and directories currently installed.)
Removing nodejs-doc (12.22.9~dfsg-1ubuntu3.6) ...
Selecting previously unselected package nodejs.
(Reading database ... 47423 files and directories currently installed.)
Preparing to unpack .../nodejs_18.20.4-1nodesource1_amd64.deb ...
Unpacking nodejs (18.20.4-1nodesource1) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs_18.20.4-1nodesource1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/systemtap/tapset/node.stp', which is also in package libnode72:amd64 12.22.9~dfsg-1ubuntu3.6
Errors were encountered while processing:
 /var/cache/apt/archives/nodejs_18.20.4-1nodesource1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
nikhil@N:~$ node -v
Command 'node' not found, but can be installed with:
sudo apt install nodejs
nikhil@N:~$ sudo apt install nodejs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  javascript-common libc-ares2 libjs-highlight.js libnode72
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 147 not upgraded.
Need to get 0 B/29.6 MB of archives.
After this operation, 187 MB of additional disk space will be used.
(Reading database ... 47423 files and directories currently installed.)
Preparing to unpack .../nodejs_18.20.4-1nodesource1_amd64.deb ...
Unpacking nodejs (18.20.4-1nodesource1) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs_18.20.4-1nodesource1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/systemtap/tapset/node.stp', which is also in package libnode72:amd64 12.22.9~dfsg-1ubuntu3.6
Errors were encountered while processing:
 /var/cache/apt/archives/nodejs_18.20.4-1nodesource1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
nikhil@N:~$ sudo apt-get remove --purge libnode72 nodejs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'nodejs' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  javascript-common libc-ares2 libjs-highlight.js
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  libnode72*
0 upgraded, 0 newly installed, 1 to remove and 147 not upgraded.
After this operation, 41.2 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 47423 files and directories currently installed.)
Removing libnode72:amd64 (12.22.9~dfsg-1ubuntu3.6) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
nikhil@N:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  javascript-common libc-ares2 libjs-highlight.js
0 upgraded, 0 newly installed, 3 to remove and 147 not upgraded.
After this operation, 2310 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 47416 files and directories currently installed.)
Removing javascript-common (11+nmu1) ...
Removing libc-ares2:amd64 (1.18.1-1ubuntu0.22.04.3) ...
Removing libjs-highlight.js (9.18.5+dfsg1-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
nikhil@N:~$ sudo apt-get clean
nikhil@N:~$ sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 147 not upgraded.
Need to get 29.6 MB of archives.
After this operation, 187 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_18.x nodistro/main amd64 nodejs amd64 18.20.4-1nodesource1 [29.6 MB]
Fetched 29.6 MB in 41s (718 kB/s)
(Reading database ... 47299 files and directories currently installed.)
Preparing to unpack .../nodejs_18.20.4-1nodesource1_amd64.deb ...
Unpacking nodejs (18.20.4-1nodesource1) ...
Setting up nodejs (18.20.4-1nodesource1) ...
Processing triggers for man-db (2.10.2-1) ...
nikhil@N:~$ sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
nodejs is already the newest version (18.20.4-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 147 not upgraded.
nikhil@N:~$ node -v
npm -v
v18.20.4
nikhil@N:~$ npm -v
10.8.3
nikhil@N:~$ npx create-vite@latest
(node:6752) [DEP0170] DeprecationWarning: The URL http://Nikhil:192004@host:port is invalid. Future versions of Node.js will throw an error.
(Use `node --trace-deprecation ...` to show where the warning was created)
npm error code ERR_INVALID_URL
npm error Invalid URL
npm error A complete log of this run can be found in: C:\Users\Nikhil\AppData\Local\npm-cache\_logs\2024-09-28T20_17_47_153Z-debug-0.log
nikhil@N:~$ npm config get proxy
 config get https-proxy
http://Nikhil:192004@host:port
nikhil@N:~$ npx create-vite@latest
(node:9728) [DEP0170] DeprecationWarning: The URL http://Nikhil:192004@host:port is invalid. Future versions of Node.js will throw an error.
(Use `node --trace-deprecation ...` to show where the warning was created)
npm error code ERR_INVALID_URL
npm error Invalid URL
npm error A complete log of this run can be found in: C:\Users\Nikhil\AppData\Local\npm-cache\_logs\2024-09-28T20_18_30_716Z-debug-0.log
nikhil@N:~$ npm config delete proxy
npm config delete https-proxy
nikhil@N:~$ npm config get proxy
 config get https-proxy
null
nikhil@N:~$ npx create-vite@latest
npm error code ERR_INVALID_URL
npm error Invalid URL
npm error A complete log of this run can be found in: C:\Users\Nikhil\AppData\Local\npm-cache\_logs\2024-09-28T20_19_22_087Z-debug-0.log
nikhil@N:~$ cat ~/.npmrc
cat: /home/nikhil/.npmrc: No such file or directory
nikhil@N:~$ npm config set registry https://registry.npmjs.org/
nikhil@N:~$ npx create-vite@latest
npm error code ERR_INVALID_URL
npm error Invalid URL
npm error A complete log of this run can be found in: C:\Users\Nikhil\AppData\Local\npm-cache\_logs\2024-09-28T20_20_23_593Z-debug-0.log
nikhil@N:~$ npm install -g create-vite

added 1 package in 3s

1 package is looking for funding
  run `npm fund` for details
nikhil@N:~$ create-vite@latest
create-vite@latest: command not found
nikhil@N:~$ create-vite@latest
create-vite@latest: command not found
nikhil@N:~$ create-vite
✔ Project name: … mynewproject
✔ Select a framework: › React
✔ Select a variant: › JavaScript

Scaffolding project in /home/nikhil/mynewproject...

Done. Now run:

  cd mynewproject
  npm install
  npm run dev

nikhil@N:~$ cd mynewproject
nikhil@N:~/mynewproject$ npm install
npm warn cleanup Failed to remove some directories [
npm warn cleanup   [
npm warn cleanup     '\\\\wsl.localhost\\Ubuntu-22.04\\home\\nikhil\\mynewproject\\node_modules\\@babel',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir '\\wsl.localhost\Ubuntu-22.04\home\nikhil\mynewproject\node_modules\@babel\traverse'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: '\\\\wsl.localhost\\Ubuntu-22.04\\home\\nikhil\\mynewproject\\node_modules\\@babel\\traverse'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     '\\\\wsl.localhost\\Ubuntu-22.04\\home\\nikhil\\mynewproject\\node_modules',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir '\\wsl.localhost\Ubuntu-22.04\home\nikhil\mynewproject\node_modules\eslint\lib\rules\utils'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: '\\\\wsl.localhost\\Ubuntu-22.04\\home\\nikhil\\mynewproject\\node_modules\\eslint\\lib\\rules\\utils'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     '\\\\wsl.localhost\\Ubuntu-22.04\\home\\nikhil\\mynewproject\\node_modules\\resolve',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir '\\wsl.localhost\Ubuntu-22.04\home\nikhil\mynewproject\node_modules\resolve\test\resolver\symlinked'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: '\\\\wsl.localhost\\Ubuntu-22.04\\home\\nikhil\\mynewproject\\node_modules\\resolve\\test\\resolver\\symlinked'
npm warn cleanup     }
npm warn cleanup   ]
npm warn cleanup ]
npm error code 1
npm error path \\wsl.localhost\Ubuntu-22.04\home\nikhil\mynewproject\node_modules\esbuild
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm error '\\wsl.localhost\Ubuntu-22.04\home\nikhil\mynewproject\node_modules\esbuild'
npm error CMD.EXE was started with the above path as the current directory.
npm error UNC paths are not supported.  Defaulting to Windows directory.
npm error node:internal/modules/cjs/loader:1148
npm error   throw err;
npm error   ^
npm error
npm error Error: Cannot find module 'C:\Windows\install.js'
npm error     at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
npm error     at Module._load (node:internal/modules/cjs/loader:986:27)
npm error     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
npm error     at node:internal/main/run_main_module:28:49 {
npm error   code: 'MODULE_NOT_FOUND',
npm error   requireStack: []
npm error }
npm error
npm error Node.js v20.15.0
npm error A complete log of this run can be found in: C:\Users\Nikhil\AppData\Local\npm-cache\_logs\2024-09-28T20_21_38_564Z-debug-0.log whats the problem help me fix it