codeapp icon indicating copy to clipboard operation
codeapp copied to clipboard

Permission issues when running npm run dev on ipad

Open jahzlariosa opened this issue 2 years ago • 7 comments

npm ERR! Cannot read properties of undefined (reading 'stdin') npm ERR! code EPERM npm ERR! syscall spawn npm ERR! errno -1 npm ERR! Error: spawn EPERM npm ERR! at ChildProcess.spawn (node:internal/child_process:413:11) npm ERR! at spawn (node:child_process:713:9) npm ERR! at /private/var/mobile/Containers/Shared/AppGroup/9479D47E-A07B-4F3F-8209-3A8AF9A6A05D/lib/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:18:12 npm ERR! at new Promise () npm ERR! at promiseSpawn (/private/var/mobile/Containers/Shared/AppGroup/9479D47E-A07B-4F3F-8209-3A8AF9A6A05D/lib/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:17:13) npm ERR! at spawnWithShell (/private/var/mobile/Containers/Shared/AppGroup/9479D47E-A07B-4F3F-8209-3A8AF9A6A05D/lib/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:123:10) npm ERR! at promiseSpawn (/private/var/mobile/Containers/Shared/AppGroup/9479D47E-A07B-4F3F-8209-3A8AF9A6A05D/lib/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:12:12) npm ERR! at runScriptPkg (/private/var/mobile/Containers/Shared/AppGroup/9479D47E-A07B-4F3F-8209-3A8AF9A6A05D/lib/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js:79:13) npm ERR! at runScript (/private/var/mobile/Containers/Shared/AppGroup/9479D47E-A07B-4F3F-8209-3A8AF9A6A05D/lib/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script.js:9:16) npm ERR! at RunScript.run (/private/var/mobile/Containers/Shared/AppGroup/9479D47E-A07B-4F3F-8209-3A8AF9A6A05D/lib/lib/node_modules/npm/lib/commands/run-script.js:121:13) npm ERR! Error: spawn EPERM npm ERR! at ChildProcess.spawn (node:internal/child_process:413:11) npm ERR! at spawn (node:child_process:713:9) npm ERR! at /private/var/mobile/Containers/Shared/AppGroup/9479D47E-A07B-4F3F-8209-3A8AF9A6A05D/lib/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:18:12 npm ERR! at new Promise () npm ERR! at promiseSpawn (/private/var/mobile/Containers/Shared/AppGroup/9479D47E-A07B-4F3F-8209-3A8AF9A6A05D/lib/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:17:13) npm ERR! at spawnWithShell (/private/var/mobile/Containers/Shared/AppGroup/9479D47E-A07B-4F3F-8209-3A8AF9A6A05D/lib/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:123:10) npm ERR! at promiseSpawn (/private/var/mobile/Containers/Shared/AppGroup/9479D47E-A07B-4F3F-8209-3A8AF9A6A05D/lib/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:12:12) npm ERR! at runScriptPkg (/private/var/mobile/Containers/Shared/AppGroup/9479D47E-A07B-4F3F-8209-3A8AF9A6A05D/lib/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js:79:13) npm ERR! at runScript (/private/var/mobile/Containers/Shared/AppGroup/9479D47E-A07B-4F3F-8209-3A8AF9A6A05D/lib/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script.js:9:16) npm ERR! at RunScript.run (/private/var/mobile/Containers/Shared/AppGroup/9479D47E-A07B-4F3F-8209-3A8AF9A6A05D/lib/lib/node_modules/npm/lib/commands/run-script.js:121:13) { npm ERR! errno: -1, npm ERR! code: 'EPERM', npm ERR! syscall: 'spawn' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator. npm ERR! A complete log of this run can be found in: /var/mobile/Containers/Data/PluginKitPlugin/FC549B91-270F-4EED-B9EA-A5C8398C01AC/Library/Caches/_logs/2023-07-09T07_07_27_705Z-debug-0.log

jahzlariosa avatar Jul 09 '23 07:07 jahzlariosa

Can you share us the content of package.json?

bummoblizard avatar Jul 10 '23 13:07 bummoblizard

Hi there same issue here on An iPad Air 5. Here is the package.json IMG_0106

Taikylah avatar Jul 17 '23 21:07 Taikylah

Same happens to me, any solution to this issue?

Weemizo avatar Sep 21 '23 15:09 Weemizo

Hi there same issue here on An iPad Air 5. Here is the package.json IMG_0106

Any solution found? I also got an iPad Air 5 IMG_0044

Weemizo avatar Sep 21 '23 15:09 Weemizo

Hello @Weemizo. The error message shows Node tried to spawn a sub-process. This is prohibited on iOS and therefore unsupported in Code App. Please see https://github.com/thebaselab/react-starter for a React sample project that I created.

bummoblizard avatar Sep 21 '23 15:09 bummoblizard

@bummoblizard, you may want to add this to the following section on what I assume is the wiki at https://code.thebaselab.com/extras/frequently-asked-questions#my-favourite-npm-python-module-doesnt-work/, or perhaps under it as a subsection for a list of templates made for codeapp that help with otherwise unsupported packages?

luni-moon avatar Sep 28 '23 17:09 luni-moon

Hi, @bummoblizard I tried your template but there is still the same error

Taikylah avatar Apr 20 '24 18:04 Taikylah