Skip to content
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

Problem installing on windows machine #999

Open
nnvvijay opened this issue Oct 31, 2024 · 1 comment
Open

Problem installing on windows machine #999

nnvvijay opened this issue Oct 31, 2024 · 1 comment
Assignees
Labels
bug Something isn't working build An issue, discussion, or pull request related to building the source needs reproduction Needs reproduction npm An issue, task, discussion, or pull request related to the NPM modules windows

Comments

@nnvvijay
Copy link

I am trying to install on windows 11 machine using power shell.

Below the steps I have done and getting errors. Can you share the full steps or how to solve this problem?

  1. Installed node js with default settings
  2. Power shell
    a. Start-Process powershell -verb runas -wait -ArgumentList "Set-ExecutionPolicy Bypass -Force"
    b. Ssc Getting below errors
    c. Also getting same error if I try this ssc setup --platform=windows

Details

S D:> cd .\testme2
PS D:\testme2> ls
PS D:\testme2> explorer .
PS D:\testme2> Start-Process powershell -verb runas -wait -ArgumentList "Set-ExecutionPolicy Bypass -Force"
PS D:\testme2> npm i @socketsupply/socket -g --verbose
npm verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
npm info using [email protected]
npm info using [email protected]
npm verbose title npm i @socketsupply/socket
npm verbose argv "i" "@socketsupply/socket" "--global" "--loglevel" "verbose"
npm verbose logfile logs-max:10 dir:C:\Users\nnvvijay\AppData\Local\npm-cache_logs\2024-10-31T15_01_21_961Z-
npm verbose logfile C:\Users\nnvvijay\AppData\Local\npm-cache_logs\2024-10-31T15_01_21_961Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/@socketsupply%2fsocket 2070ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@socketsupply%2fsocket-darwin-arm64 1943ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@socketsupply%2fsocket-darwin-x64 2024ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@socketsupply%2fsocket-linux-arm64 2032ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@socketsupply%2fsocket-linux-x64 2043ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@socketsupply%2fsocket-win32-x64 2395ms (cache revalidated)
npm verbose reify failed optional dependency C:\Users\nnvvijay\AppData\Roaming\npm\node_modules@socketsupply\socket\node_modules@socketsupply\socket-linux-x64
npm verbose reify failed optional dependency C:\Users\nnvvijay\AppData\Roaming\npm\node_modules@socketsupply\socket\node_modules@socketsupply\socket-darwin-arm64

changed 1 package in 5s
npm verbose cwd D:\testme2
npm verbose os Windows_NT 10.0.26100
npm verbose node v22.11.0
npm verbose npm v10.9.0
npm verbose exit 0
npm info ok
PS D:\testme2> ssc
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@socketsupply/socket-win32-x64' imported from C:\Users\nnvvijay\AppData\Roaming\npm\node_modules@socketsupply\socket\bin\ssc.js
at packageResolve (node:internal/modules/esm/resolve:838:9)
at moduleResolve (node:internal/modules/esm/resolve:907:18)
at defaultResolve (node:internal/modules/esm/resolve:1037:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:650:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:599:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:582:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:241:38)
at onImport.tracePromise.proto (node:internal/modules/esm/loader:542:36)
at TracingChannel.tracePromise (node:diagnostics_channel:337:14)
at ModuleLoader.import (node:internal/modules/esm/loader:541:21) {
code: 'ERR_MODULE_NOT_FOUND'
}

@scsmash3r
Copy link

I am trying to install on windows 11 machine using power shell.

Below the steps I have done and getting errors. Can you share the full steps or how to solve this problem?

1. Installed node js with default settings

2. Power shell
   a.	Start-Process powershell -verb runas -wait -ArgumentList "Set-ExecutionPolicy Bypass -Force"
   b.	Ssc  Getting below errors
   c.	Also getting same error if I try this ssc setup --platform=windows

Details

S D:> cd .\testme2 PS D:\testme2> ls PS D:\testme2> explorer . PS D:\testme2> Start-Process powershell -verb runas -wait -ArgumentList "Set-ExecutionPolicy Bypass -Force" PS D:\testme2> npm i @socketsupply/socket -g --verbose npm verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js npm info using [email protected] npm info using [email protected] npm verbose title npm i @socketsupply/socket npm verbose argv "i" "@socketsupply/socket" "--global" "--loglevel" "verbose" npm verbose logfile logs-max:10 dir:C:\Users\nnvvijay\AppData\Local\npm-cache_logs\2024-10-31T15_01_21_961Z- npm verbose logfile C:\Users\nnvvijay\AppData\Local\npm-cache_logs\2024-10-31T15_01_21_961Z-debug-0.log npm http fetch GET 200 https://registry.npmjs.org/@socketsupply%2fsocket 2070ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/@socketsupply%2fsocket-darwin-arm64 1943ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/@socketsupply%2fsocket-darwin-x64 2024ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/@socketsupply%2fsocket-linux-arm64 2032ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/@socketsupply%2fsocket-linux-x64 2043ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/@socketsupply%2fsocket-win32-x64 2395ms (cache revalidated) npm verbose reify failed optional dependency C:\Users\nnvvijay\AppData\Roaming\npm\node_modules@socketsupply\socket\node_modules@socketsupply\socket-linux-x64 npm verbose reify failed optional dependency C:\Users\nnvvijay\AppData\Roaming\npm\node_modules@socketsupply\socket\node_modules@socketsupply\socket-darwin-arm64

changed 1 package in 5s npm verbose cwd D:\testme2 npm verbose os Windows_NT 10.0.26100 npm verbose node v22.11.0 npm verbose npm v10.9.0 npm verbose exit 0 npm info ok PS D:\testme2> ssc Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@socketsupply/socket-win32-x64' imported from C:\Users\nnvvijay\AppData\Roaming\npm\node_modules@socketsupply\socket\bin\ssc.js at packageResolve (node:internal/modules/esm/resolve:838:9) at moduleResolve (node:internal/modules/esm/resolve:907:18) at defaultResolve (node:internal/modules/esm/resolve:1037:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:650:12) at #cachedDefaultResolve (node:internal/modules/esm/loader:599:25) at ModuleLoader.resolve (node:internal/modules/esm/loader:582:38) at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:241:38) at onImport.tracePromise.proto (node:internal/modules/esm/loader:542:36) at TracingChannel.tracePromise (node:diagnostics_channel:337:14) at ModuleLoader.import (node:internal/modules/esm/loader:541:21) { code: 'ERR_MODULE_NOT_FOUND' }

The problem is with npmjs repository: it does not include consistent dependency.

If you look at https://www.npmjs.com/package/@socketsupply/socket?activeTab=code -> package.json file, there will be this section:

  "optionalDependencies": {
    "@socketsupply/socket-darwin-arm64": "0.6.0-rc.8",
    "@socketsupply/socket-darwin-x64": "0.6.0-rc.8",
    "@socketsupply/socket-linux-arm64": "0.6.0-rc.8",
    "@socketsupply/socket-linux-x64": "0.6.0-rc.8",
    "@socketsupply/socket-win32-x64": "0.6.0-rc.8"
  }

NPM repository has this package: https://www.npmjs.com/package/@socketsupply/socket-win32-x64 - but it has older version 0.6.0-rc.5 - so mismatch in dependencies causes an error ERR_MODULE_NOT_FOUND because NPM searches for rc.8 version of package.

You can resolve this manually by installing older package yourself, globally:

npm i -g @socketsupply/socket-win32-x64

@heapwolf @jwerle NPM repo probably needs an update on that rc version for win32. Right now I've stumbled upon same problem during install, and installing from git can be unintuitive for those devs who stick to npmjs.

@jwerle jwerle self-assigned this Nov 15, 2024
@jwerle jwerle added bug Something isn't working needs reproduction Needs reproduction npm An issue, task, discussion, or pull request related to the NPM modules windows build An issue, discussion, or pull request related to building the source labels Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build An issue, discussion, or pull request related to building the source needs reproduction Needs reproduction npm An issue, task, discussion, or pull request related to the NPM modules windows
Projects
None yet
Development

No branches or pull requests

3 participants