前提・実現したいこと
ReactNative+Expoを用いたインスタのような写真投稿・通知アプリ(Android・iOS)を作ろうとしています。
ローカル環境へのnpm installにてエラーが発生し困っております。。
お力お貸しいただきたく投稿させていただきました。
環境:Windows10上のUbuntu仮想環境 WSLを導入
node.js,npmはインストール完了しています。
nodejs: v12.13.0
npm: 6.12.0
expo-cli,firebase-toolsについては、警告エラーが出たものの一応インストール完了しました。(下部にエラー内容は記載。こちらは警告のため保留しています)
expo-cli:3.22.3
firebase-tools:8.6.0
発生している問題・エラーメッセージ
ローカル環境へのnpm installを行いました。
npm install
すると下記のエラーが出ました。
npm ERR! <head> npm ERR! ...' npm ERR! A complete log of this run can be found in: npm ERR! /home/user/.npm/_logs/-debug.log
ログファイルの中身は下記です。
0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install' ] 2 info using npm@6.12.0 3 info using node@v12.13.0 4 verbose npm-session d2b86c3725485c96 5 silly install runPreinstallTopLevelLifecycles 6 silly preinstall yumfarm_code 7 info lifecycle @~preinstall: @ 8 silly install loadCurrentTree 9 silly install readLocalPackageData 10 timing stage:loadCurrentTree Completed in 15ms 11 silly install loadIdealTree 12 silly install cloneCurrentTreeToIdealTree 13 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms 14 silly install loadShrinkwrap 15 timing stage:loadIdealTree:loadShrinkwrap Completed in 4ms 16 silly install loadAllDepsIntoIdealTree 17 http fetch GET 200 proxy_address-No-inst.html 235ms 18 silly fetchPackageMetaData error for @types/react@^16.9.23 Unexpected token < in JSON at position 0 while parsing near '<html> 18 silly fetchPackageMetaData <head> 18 silly fetchPackageMetaData ...' 19 http fetch GET 200 proxy_address-No-inst.html 236ms 20 http fetch GET 200 proxy_address-No-inst.html 236ms 21 silly fetchPackageMetaData error for eslint-plugin-jsx-a11y@^6.2.3 Unexpected token < in JSON at position 0 while parsing near '<html> 21 silly fetchPackageMetaData <head> 21 silly fetchPackageMetaData ...' 22 silly fetchPackageMetaData error for eslint-plugin-import@^2.18.2 Unexpected token < in JSON at position 0 while parsing near '<html> 22 silly fetchPackageMetaData <head> 22 silly fetchPackageMetaData ...' 23 http fetch GET 200 proxy_address-No-inst.html 239ms 24 http fetch GET 200 proxy_address-No-inst.html 243ms 25 silly fetchPackageMetaData error for eslint-config-prettier@^6.7.0 Unexpected token < in JSON at position 0 while parsing near '<html> 25 silly fetchPackageMetaData <head> 25 silly fetchPackageMetaData ...' 26 silly fetchPackageMetaData error for @types/react-native@^0.60.15 Unexpected token < in JSON at position 0 while parsing near '<html> 26 silly fetchPackageMetaData <head> 26 silly fetchPackageMetaData ...' 27 http fetch GET 200 proxy_address-No-inst.html 247ms 28 http fetch GET 200 proxy_address-No-inst.html 247ms 29 silly fetchPackageMetaData error for babel-preset-expo@^8.0.0 Unexpected token < in JSON at position 0 while parsing near '<html> 29 silly fetchPackageMetaData <head> 29 silly fetchPackageMetaData ...' 30 silly fetchPackageMetaData error for babel-eslint@^10.1.0 Unexpected token < in JSON at position 0 while parsing near '<html> 30 silly fetchPackageMetaData <head> 30 silly fetchPackageMetaData ...' 31 http fetch GET 200 proxy_address-No-inst.html 248ms
package.jsonの内容
"jest": { "preset": "jest-expo" }, "dependencies": { "@expo/samples": "^3.0.3", "@expo/vector-icons": "^10.0.0", "dayjs": "^1.8.21", "expo": "^36.0.0", "expo-analytics-amplitude": "~8.0.0", "expo-app-auth": "~8.0.0", "expo-asset": "~8.0.0", "expo-blur": "~8.0.0", "expo-constants": "~8.0.0", "expo-file-system": "~8.0.0", "expo-font": "~8.0.0", "expo-gl": "~8.0.0", "expo-google-app-auth": "^6.0.0", "expo-google-sign-in": "~8.0.0", "expo-image-crop": "file:expo-image-crop", "expo-image-manipulator": "~8.0.0", "expo-image-picker": "~8.0.1", "expo-media-library": "~8.0.0", "expo-permissions": "~8.0.0", "expo-web-browser": "~8.0.0", "firebase": "6.0.2", "lodash": "^4.17.15", "react": "16.9.0", "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz", "react-native-alert-async": "^1.0.3", "react-native-easy-toast": "^1.2.0", "react-native-elements": "^1.2.7", "react-native-expo-image-cache": "file:react-native-expo-image-cache_modified", "react-native-gallery-swiper": "^1.23.1", "react-native-gesture-handler": "~1.5.0", "react-native-keyboard-aware-scroll-view": "^0.9.1", "react-native-modal": "^11.5.4", "react-native-progress": "^3.6.0", "react-native-reanimated": "~1.4.0", "react-native-safe-area-context": "0.6.0", "react-native-safe-area-view": "^1.0.0", "react-native-screens": "2.0.0-alpha.12", "react-native-simple-radio-button": "^2.7.4", "react-native-svg": "9.13.3", "react-native-tab-view": "^2.10.2", "react-native-vector-icons": "^6.6.0", "react-native-webview": "7.4.3", "react-navigation": "^3.13.0", "react-navigation-redux-helpers": "^2.0.5", "react-redux": "6.0.0", "redux": "^4.0.4", "sentry-expo": "~2.0.0" }, "devDependencies": { "@types/react": "^16.9.23", "@types/react-native": "^0.60.15", "babel-eslint": "^10.1.0", "babel-preset-expo": "^8.0.0", "eslint": "^6.6.0", "eslint-config-airbnb": "^18.0.1", "eslint-config-prettier": "^6.7.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-prettier": "^3.1.1", "eslint-plugin-react": "^7.16.0", "eslint-plugin-react-hooks": "^2.5.0", "eslint-plugin-react-native": "^3.8.1", "expo-codemod": "^1.0.7", "jest-expo": "^36.0.0", "npm-run-all": "^4.1.5", "prettier": "^1.19.1" }, "private": true }
試したこと
同様のエラーで検索し、下記を実行しましたがエラー改善しませんでした。
npm cache clean --force
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/09/18 06:05