lukehaas / RunJS

RunJS is a JavaScript playground for macOS, Windows and Linux. Write code with instant feedback and access to Node.js and browser APIs.
https://runjs.app
2.05k stars 44 forks source link

npm packages no longer install #611

Closed wx007 closed 8 months ago

wx007 commented 8 months ago

Is it just me or do npm package no longer install since the update last week?

I receive an "Error: 'Network Error'" message in Run.js yet I can successfully install npm packages from the terminal and VSCode. Anyone else experiencing this issue inside Run.js?

lukehaas commented 8 months ago

Hi @wx007 . Could you provide a copy of your debug log? You can access this from the help menu.

wx007 commented 8 months ago

{ "version": "2.11.0", "platform": "darwin", "arch": "x64", "activated": true, "logs": [ { "path": "/Users/archive/Library/Logs/runjs/main.log", "lines": [ "[2024-02-26 12:28:12.633] [warn] sysctl shell command to check for macOS Rosetta environment failed: Error: Command failed: sysctl sysctl.proc_translated", "sysctl: unknown oid 'sysctl.proc_translated'", "", "[2024-02-26 12:28:33.927] [warn] Error: The command is disabled and cannot be executed", " at d.quitAndInstall (/Applications/RunJS.app/Contents/Resources/app.asar/entry-bundle.js:14:150709)", " at O (/Applications/RunJS.app/Contents/Resources/app.asar/entry-bundle.js:8:122125)", " at quitAndInstall (/Applications/RunJS.app/Contents/Resources/app.asar/entry-bundle.js:8:120224)", " at click (/Applications/RunJS.app/Contents/Resources/app.asar/entry-bundle.js:8:90045)", " at MenuItem.click (node:electron/js2c/browser_init:2:31004)", " at Menu._executeCommand (node:electron/js2c/browser_init:2:36400)", "[2024-02-26 12:28:33.931] [error] Error: Error: The command is disabled and cannot be executed", " at d.quitAndInstall (/Applications/RunJS.app/Contents/Resources/app.asar/entry-bundle.js:14:150709)", " at O (/Applications/RunJS.app/Contents/Resources/app.asar/entry-bundle.js:8:122125)", " at quitAndInstall (/Applications/RunJS.app/Contents/Resources/app.asar/entry-bundle.js:8:120224)", " at click (/Applications/RunJS.app/Contents/Resources/app.asar/entry-bundle.js:8:90045)", " at MenuItem.click (node:electron/js2c/browser_init:2:31004)", " at Menu._executeCommand (node:electron/js2c/browser_init:2:36400)", "[2024-03-02 14:21:32.536] [error] [renderer] Error: Command failed: \"/Applications/RunJS.app/Contents/Frameworks/RunJS Helper (Renderer).app/Contents/MacOS/RunJS Helper (Renderer)\" \"/Applications/RunJS.app/Contents/Resources/app.asar.unpacked/node_modules/npm/bin/npm-cli.js\" search geo-coordinates-parser --json --no-description --userconfig=\"/Users/archive/Library/Application Support/runjs/.npmrc\"", "npm ERR! code EACCES", "npm ERR! syscall mkdir", "npm ERR! path /Users/archive/.npm/_cacache/content-v2/sha512/b6/54", "npm ERR! errno -13", "npm ERR! ", "npm ERR! Your cache folder contains root-owned files, due to a bug in", "npm ERR! previous versions of npm which has since been addressed.", "npm ERR! ", "npm ERR! To permanently fix this problem, please run:", "npm ERR! sudo chown -R 501:20 \"/Users/archive/.npm\"", "", "npm ERR! A complete log of this run can be found in: /Users/archive/.npm/_logs/2024-03-02T19_21_32_035Z-debug-0.log", "", " at node_internal_genericNodeError (node:internal/errors:866:15)", " at ChildProcess.exithandler (node:child_process:422:12)", " at ChildProcess.emit (node:events:514:28)", " at maybeClose (node:internal/child_process:1105:16)", " at ChildProcess._handle.onexit (node:internal/child_process:305:5)", "[2024-03-02 14:21:39.550] [error] [renderer] Error: Command failed: \"/Applications/RunJS.app/Contents/Frameworks/RunJS Helper (Renderer).app/Contents/MacOS/RunJS Helper (Renderer)\" \"/Applications/RunJS.app/Contents/Resources/app.asar.unpacked/node_modules/npm/bin/npm-cli.js\" search geo --json --no-description --userconfig=\"/Users/archive/Library/Application Support/runjs/.npmrc\"", "npm ERR! code EACCES", "npm ERR! syscall mkdir", "npm ERR! path /Users/archive/.npm/_cacache/index-v5/4d/a4", "npm ERR! errno -13", "npm ERR! ", "npm ERR! Your cache folder contains root-owned files, due to a bug in", "npm ERR! previous versions of npm which has since been addressed.", "npm ERR! ", "npm ERR! To permanently fix this problem, please run:", "npm ERR! sudo chown -R 501:20 \"/Users/archive/.npm\"", "", "npm ERR! A complete log of this run can be found in: /Users/archive/.npm/_logs/2024-03-02T19_21_38_965Z-debug-0.log", "", " at node_internal_genericNodeError (node:internal/errors:866:15)", " at ChildProcess.exithandler (node:child_process:422:12)", " at ChildProcess.emit (node:events:514:28)", " at maybeClose (node:internal/child_process:1105:16)", " at ChildProcess._handle.onexit (node:internal/child_process:305:5)", "[2024-03-02 14:22:02.985] [error] [renderer] Error: Command failed: \"/Applications/RunJS.app/Contents/Frameworks/RunJS Helper (Renderer).app/Contents/MacOS/RunJS Helper (Renderer)\" \"/Applications/RunJS.app/Contents/Resources/app.asar.unpacked/node_modules/npm/bin/npm-cli.js\" search geo --json --no-description --userconfig=\"/Users/archive/Library/Application Support/runjs/.npmrc\"", "npm ERR! code EACCES", "npm ERR! syscall mkdir", "npm ERR! path /Users/archive/.npm/_cacache/index-v5/4d/a4", "npm ERR! errno -13", "npm ERR! ", "npm ERR! Your cache folder contains root-owned files, due to a bug in", "npm ERR! previous versions of npm which has since been addressed.", "npm ERR! ", "npm ERR! To permanently fix this problem, please run:", "npm ERR! sudo chown -R 501:20 \"/Users/archive/.npm\"", "", "npm ERR! A complete log of this run can be found in: /Users/archive/.npm/_logs/2024-03-02T19_22_02_032Z-debug-0.log", "", " at node_internal_genericNodeError (node:internal/errors:866:15)", " at ChildProcess.exithandler (node:child_process:422:12)", " at ChildProcess.emit (node:events:514:28)", " at maybeClose (node:internal/child_process:1105:16)", " at Socket. (node:internal/child_process:457:11)", " at Socket.emit (node:events:514:28)", " at Pipe. (node:net:337:12)", "[2024-03-02 14:22:08.797] [error] [renderer] Error: Command failed: \"/Applications/RunJS.app/Contents/Frameworks/RunJS Helper (Renderer).app/Contents/MacOS/RunJS Helper (Renderer)\" \"/Applications/RunJS.app/Contents/Resources/app.asar.unpacked/node_modules/npm/bin/npm-cli.js\" search geo-coo --json --no-description --userconfig=\"/Users/archive/Library/Application Support/runjs/.npmrc\"", "npm ERR! code EACCES", "npm ERR! syscall mkdir", "npm ERR! path /Users/archive/.npm/_cacache/content-v2/sha512/ea/ea", "npm ERR! errno -13", "npm ERR! ", "npm ERR! Your cache folder contains root-owned files, due to a bug in", "npm ERR! previous versions of npm which has since been addressed.", "npm ERR! ", "npm ERR! To permanently fix this problem, please run:", "npm ERR! sudo chown -R 501:20 \"/Users/archive/.npm\"", "", "npm ERR! A complete log of this run can be found in: /Users/archive/.npm/_logs/2024-03-02T19_22_07_755Z-debug-0.log", "", " at __node_internal_genericNodeError (node:internal/errors:866:15)", " at ChildProcess.exithandler (node:child_process:422:12)", " at ChildProcess.emit (node:events:514:28)", " at maybeClose (node:internal/child_process:1105:16)", " at Socket. (node:internal/child_process:457:11)", " at Socket.emit (node:events:514:28)", " at Pipe. (node:net:337:12)", "[2024-03-02 14:22:10.112] [error] [renderer] Error: Command failed: \"/Applications/RunJS.app/Contents/Frameworks/RunJS Helper (Renderer).app/Contents/MacOS/RunJS Helper (Renderer)\" \"/Applications/RunJS.app/Contents/Resources/app.asar.unpacked/node_modules/npm/bin/npm-cli.js\" search geo-coor --json --no-description --userconfig=\"/Users/archive/Library/Application Support/runjs/.npmrc\"", "npm ERR! code EACCES", "npm ERR! syscall mkdir", "npm ERR! path /Users/archive/.npm/_cacache/content-v2/sha512/27/53", "npm ERR! errno -13", "npm ERR! ", "npm ERR! Your cache folder contains root-owned files, due to a bug in", "npm ERR! previous versions of npm which has since been addressed.", "npm ERR! ", "npm ERR! To permanently fix this problem, please run:", "npm ERR! sudo chown -R 501:20 \"/Users/archive/.npm\"", "", "npm ERR! A complete log of this run can be found in: /Users/archive/.npm/_logs/2024-03-02T19_22_09_530Z-debug-0.log", "", " at node_internal_genericNodeError (node:internal/errors:866:15)", " at ChildProcess.exithandler (node:child_process:422:12)", " at ChildProcess.emit (node:events:514:28)", " at maybeClose (node:internal/child_process:1105:16)", " at ChildProcess._handle.onexit (node:internal/child_process:305:5)", "[2024-03-02 14:22:12.747] [error] [renderer] Error: Command failed: \"/Applications/RunJS.app/Contents/Frameworks/RunJS Helper (Renderer).app/Contents/MacOS/RunJS Helper (Renderer)\" \"/Applications/RunJS.app/Contents/Resources/app.asar.unpacked/node_modules/npm/bin/npm-cli.js\" search geo-coordinate --json --no-description --userconfig=\"/Users/archive/Library/Application Support/runjs/.npmrc\"", "npm ERR! code EACCES", "npm ERR! syscall mkdir", "npm ERR! path /Users/archive/.npm/_cacache/index-v5/6d/a8", "npm ERR! errno -13", "npm ERR! ", "npm ERR! Your cache folder contains root-owned files, due to a bug in", "npm ERR! previous versions of npm which has since been addressed.", "npm ERR! ", "npm ERR! To permanently fix this problem, please run:", "npm ERR! sudo chown -R 501:20 \"/Users/archive/.npm\"", "", "npm ERR! A complete log of this run can be found in: /Users/archive/.npm/_logs/2024-03-02T19_22_11_636Z-debug-0.log", "", " at __node_internal_genericNodeError (node:internal/errors:866:15)", " at ChildProcess.exithandler (node:child_process:422:12)", " at ChildProcess.emit (node:events:514:28)", " at maybeClose (node:internal/child_process:1105:16)", " at ChildProcess._handle.onexit (node:internal/child_process:305:5)", "[2024-03-04 12:08:10.866] [error] Unhandled TypeError: Cannot read properties of undefined (reading 'libraryDefaultDir')", " at Function.resolvePathFn (/Applications/RunJS.app/Contents/Resources/app.asar/entry-bundle.js:14:97807)", " at Function.readAllLogs (/Applications/RunJS.app/Contents/Resources/app.asar/entry-bundle.js:14:97314)", " at click (/Applications/RunJS.app/Contents/Resources/app.asar/entry-bundle.js:8:90678)", " at MenuItem.click (node:electron/js2c/browser_init:2:29559)", " at a._executeCommand (node:electron/js2c/browser_init:2:34987)", "" ] } ] }

On Mar 4, 2024, at 9:10 AM, Luke Haas @.***> wrote:

Hi @wx007 https://github.com/wx007 . Could you provide a copy of your debug log? You can access this from the help menu.

— Reply to this email directly, view it on GitHub https://github.com/lukehaas/RunJS/issues/611#issuecomment-1976667523, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7475Z6SRAXH2V5OSOTCYTYWR6FPAVCNFSM6AAAAABEEONUOGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZWGY3DONJSGM. You are receiving this because you were mentioned.

lukehaas commented 8 months ago

@wx007 thanks. Looks like this error could be a likely cause:

Your cache folder contains root-owned files, due to a bug in previous versions of npm which has since been addressed

Try running this command in your terminal to fix it: sudo chown -R 501:20 "/Users/archive/.npm"

wx007 commented 8 months ago

That worked. Thanks!

On Mar 4, 2024, at 12:17 PM, Luke Haas @.***> wrote:

@wx007 https://github.com/wx007 thanks. Looks like this error could be a likely cause:

Your cache folder contains root-owned files, due to a bug in previous versions of npm which has since been addressed Try running this command in your terminal to fix it: sudo chown -R 501:20 "/Users/archive/.npm"

— Reply to this email directly, view it on GitHub https://github.com/lukehaas/RunJS/issues/611#issuecomment-1977085769, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7475Y5VGM2QJ2JAD5374TYWSUDZAVCNFSM6AAAAABEEONUOGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZXGA4DKNZWHE. You are receiving this because you were mentioned.