我尝试安装expo,但它给了我一个无法修复的复杂错误,有人可以帮助我吗?我尝试了几乎所有可以做的事,但无法解决。它显示为已安装,但我尝试运行其命令不起作用。另外,我还会在下面收到一堆警告。
> @expo/traveling-fastlane-linux@1.9.3 preinstall /root/npm/lib/node_modules/expo-cli/node_modules/@expo/traveling-fastlane-linux
> node platform.js
module.js:550
throw err;
^
Error: Cannot find module '/root/npm/lib/node_modules/expo-cli/node_modules/@expo/traveling-fastlane-linux/platform.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
/root/npm/bin/expo -> /root/npm/lib/node_modules/expo-cli/bin/expo.js
/root/npm/bin/expo-cli -> /root/npm/lib/node_modules/expo-cli/bin/expo.js
> iltorb@2.4.2 install /root/npm/lib/node_modules/expo-cli/node_modules/iltorb
> node ./scripts/install.js || node-gyp rebuild
module.js:550
throw err;
^
Error: Cannot find module '/root/npm/lib/node_modules/expo-cli/node_modules/iltorb/scripts/install.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.15.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/root/npm/lib/node_modules/expo-cli/node_modules/iltorb/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, stat '/root/npm/lib/node_modules/expo-cli/node_modules/iltorb/.node-gyp/8.15.1'
gyp ERR! System Linux 4.4.0-53-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/npm/lib/node_modules/expo-cli/node_modules/iltorb
gyp ERR! node -v v8.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN ts-pnp@1.0.1 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-darwin-ia32@2.2.8 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-darwin-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-darwin-ia32@2.2.8: wanted {"os":"darwin","arch":"ia32"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-darwin-x64@2.2.8 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-darwin-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-darwin-x64@2.2.8: wanted {"os":"darwin","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-freebsd-ia32@2.2.8 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-freebsd-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-freebsd-ia32@2.2.8: wanted {"os":"freebsd","arch":"ia32"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-freebsd-x64@2.2.8 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-freebsd-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-freebsd-x64@2.2.8: wanted {"os":"freebsd","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-linux-arm@2.2.8 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-linux-arm):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/ngrok-bin-linux-arm@2.2.8: wanted {"os":"linux","arch":"arm"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/ngrok-bin-linux-arm64@2.2.8 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-linux-arm64):
+ expo-cli@2.14.0
updated 1 package in 179.2s