HeyPuter / puter

🌐 The Internet OS! Free, Open-Source, and Self-Hostable.
https://puter.com
GNU Affero General Public License v3.0
25.53k stars 1.68k forks source link

Unable to Run on Windows 11 with Node 21 #294

Closed rajivraghu closed 3 months ago

rajivraghu commented 6 months ago
PS C:\POC\PuterOs\puter> npm install
npm WARN deprecated phin@2.9.3: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated xterm-addon-fit@0.7.0: This package is now deprecated. Move to @xterm/addon-fit instead.
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated sinon@15.2.0: 16.1.1
npm WARN deprecated xterm@5.3.0: This package is now deprecated. Move to @xterm/xterm instead.

> puter.com@2.1.0 postinstall
> cd packages/phoenix && cd packages/contextlink && npm install && cd - && cd packages/strataparse && npm install && cd - && cd packages/pty && npm install

added 77 packages, changed 1 package, and audited 82 packages in 2s

21 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
The system cannot find the path specified.
npm ERR! code 1
npm ERR! path C:\POC\PuterOs\puter
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c cd packages/phoenix && cd packages/contextlink && npm install && cd - && cd packages/strataparse && npm install && cd - && cd packages/pty && npm install

After this npm start , This will not start properly..

image

Blank UI

RobertLupas commented 6 months ago

I have the same issue! I haven't figured the solution out yet, but I'll try looking into it and posting it here.

RobertLupas commented 6 months ago

This is related to the problem in #208, which has a pending pull request (#215) to fix the issue. But I don't think that this also fixes

npm ERR! code 1
npm ERR! path path\to\puter\repo
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c cd packages/phoenix && cd packages/contextlink && npm install && cd - && cd packages/strataparse && npm install && cd - && cd packages/pty && npm install
KernelDeimos commented 6 months ago

The PR you mentioned breaks production deployment so we can't merge it, but I think the issue you're experiencing is different. I suspect the issue you're encountering is a Windows-specific failure, since we don't see much testing under Windows environments.

My recommendations are to try under Docker, try under WSL or Linux, or if you contribute a fix for Windows we will merge it. If you try any of these let us know how it goes so we can rule out anything that isn't specific to Windows.

sakhimpungose commented 6 months ago

I also experienced this issue, I manage to fix it by changing the postinstall script in the main package.json file. cd packages/phoenix && cd packages/contextlink && npm install && cd ../../packages/strataparse && npm install && cd ../../packages/pty && npm install

Eric-Lighthall commented 6 months ago

I also experienced this issue, I manage to fix it by changing the postinstall script in the main package.json file. cd packages/phoenix && cd packages/contextlink && npm install && cd ../../packages/strataparse && npm install && cd ../../packages/pty && npm install

This works for the package installation on Windows, but running puter locally on Windows still seems to break it. Instead, I use WSL for puter development.

phook commented 6 months ago

The earlier comment fixes the install problem (but && cd ../.. should be added). When running puter it serves the wrong directory for static files:

paper.webp:1 Failed to load resource: the server responded with a status of 404 (Not Found) initgui.js:1 Failed to load resource: the server responded with a status of 404 (Not Found) helpers.js:1 Failed to load resource: the server responded with a status of 404 (Not Found) IPC.js:1 Failed to load resource: the server responded with a status of 404 (Not Found) globals.js:1 Failed to load resource: the server responded with a status of 404 (Not Found) i18n.js:1 Failed to load resource: the server responded with a status of 404 (Not Found) index.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)

These are all attempted be loaded from /src, however files are present at / I am however not able to find where or why this problem occurs :-(

jelveh commented 3 months ago

This has been finally fixed 😭 Puter should now run in Windows without issues.