小编Dee*_*hah的帖子

npm 错误!cb() 从未被调用

我试图下载 expo cli,但出现错误:-

C:\WINDOWS\system32>npm i -g expo-cli
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://github.com/npm/cli/issues>

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\HP\AppData\Local\npm-cache\_logs\2021-03-03T14_02_14_809Z-debug.log
Run Code Online (Sandbox Code Playgroud)

我还使用了npm cache clean --force。但它也没有起作用

C:\WINDOWS\system32>npm -v
7.6.0

C:\WINDOWS\system32>node -v
v14.16.0
Run Code Online (Sandbox Code Playgroud)

请帮我......

执行完npm i -g npm后它起作用了!!!!!!

但是当我尝试安装或下载任何软件包时出现错误:

E:\React-native\practice>npm i react-native-elements
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. …
Run Code Online (Sandbox Code Playgroud)

node.js npm react-native npm-install expo

5
推荐指数
1
解决办法
2万
查看次数

无法解析“react-firebase-hooks”

我正在开发 Next js 项目,并安装了名为react-firebase-hooks 的包。我的 Package.json 文件:

{
  "name": "whatsapp",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start"
  },
  "dependencies": {
    "@material-ui/core": "^4.11.3",
    "@material-ui/icons": "^4.11.2",
    "axios": "^0.21.1",
    "email-validator": "^2.0.4",
    "firebase": "^8.3.1",
    "next": "10.1.2",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-firebase-hooks": "^3.0.3",
    "styled-components": "^5.2.2"
  }
}
Run Code Online (Sandbox Code Playgroud)

但是当我尝试将其导入 Next js 文件 _app.js 时

import '../styles/globals.css'
import {useAuthState} from "react-firebase-hooks"

function MyApp({ Component, pageProps }) {

  return <Component {...pageProps} />
}

export default MyApp
Run Code Online (Sandbox Code Playgroud)

但我收到错误:

error - ./pages/_app.js:2:0 …
Run Code Online (Sandbox Code Playgroud)

npm firebase reactjs npm-install next.js

0
推荐指数
1
解决办法
1728
查看次数

标签 统计

npm ×2

npm-install ×2

expo ×1

firebase ×1

next.js ×1

node.js ×1

react-native ×1

reactjs ×1