13

When I try to run my expo project I get this message:

D:\React\myproject>npm start

> start
> expo start

Starting project at D:\React\myproject
Unable to find expo in this project - have you run yarn / npm install yet? 

If I run npm install i get this:

D:\React\myproject>npm install
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/

up to date, audited 940 packages in 4s

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

12 vulnerabilities (6 low, 6 moderate)

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details. 

And this is what I get when I run npm audit:

 D:\React\myproject>npm audit
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
# npm audit report

node-fetch  =0.22.0-rc
          Depends on vulnerable versions of @react-native-community/cli
          Depends on vulnerable versions of @react-native-community/cli-platform-ios
          Depends on vulnerable versions of fbjs
          node_modules/react-native
          node_modules/react-native/node_modules/react-native
        metro-config  =0.3.2
  Depends on vulnerable versions of xmldom
  node_modules/plist
    @react-native-community/cli-platform-ios  *
    Depends on vulnerable versions of plist
    Depends on vulnerable versions of xcode
    node_modules/@react-native-community/cli-platform-ios
      react-native  =0.22.0-rc
      Depends on vulnerable versions of @react-native-community/cli
      Depends on vulnerable versions of @react-native-community/cli-platform-ios
      Depends on vulnerable versions of fbjs
      node_modules/react-native
      node_modules/react-native/node_modules/react-native
        @react-native-community/cli  *
        Depends on vulnerable versions of metro
        Depends on vulnerable versions of react-native
        node_modules/react-native/node_modules/@react-native-community/cli
    simple-plist  *
    Depends on vulnerable versions of plist
    node_modules/simple-plist
      xcode  >=0.8.3
      Depends on vulnerable versions of simple-plist
      node_modules/xcode

12 vulnerabilities (6 low, 6 moderate)

Some issues need review, and may require choosing
a different dependency. 

This happens since I tried to update expo sdk, but I don't know what I did wrong. Can someone help me with this?

Diogo Pinheiro
  • 131
  • 1
  • 5

2 Answers2

36

Run npm config set registry https://registry.npmjs.org/

Some computers are still running with http://registry.npmjs.org/ which is not going to be allowed anymore for security reasons.

Junior Yono
  • 516
  • 3
  • 5
  • 3
    Run `npm config get registry` first to see what your current config is and make sure it changed with the above command. – ewack Sep 14 '21 at 16:21
  • I love how none of these commands are listed in the official github blog page which the error message redirects people: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/ Thanks for the info guys! – Lajos Mészáros Oct 12 '21 at 14:35
2

You may try adding a .npmrc file and update the repo allocation under the user\xxx directory. registry=https://registry.npmjs.org/

Arindam
  • 675
  • 8
  • 15