小编Moo*_*mid的帖子

尝试安装 react-redux 依赖项时出错

我在尝试将 react-redux 包安装到我的 create-react-app 应用程序上时遇到错误。我尝试删除并重新安装我的 node_modules 文件夹以及使用管理员权限安装它,但我仍然收到相同的错误

?  frontend git:(main) ? npm i react-redux
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
Run Code Online (Sandbox Code Playgroud)

这是控制台的剩余输出

npm ERR! 
npm ERR! While resolving: frontend@0.1.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.3" from react-redux@7.2.1
npm ERR! node_modules/react-redux
npm ERR!   react-redux@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency …
Run Code Online (Sandbox Code Playgroud)

node.js npm reactjs react-redux

24
推荐指数
3
解决办法
3万
查看次数

mongoose 属性 'password' 在类型 'Document<any> 上不存在

-- userSchema.ts 接口

import mongoose, { Schema, Document } from "mongoose";
import moment from "moment";
import bcrypt from "bcrypt";

export interface UserDoc extends Document {
  name: {
    type: string;
    required: boolean;
  };
  email: {
    type: string;
    required: boolean;
  };
  password: {
    type: string;
    required: boolean;
  };
  dateJoined: {
    type: string;
    default: string;
  };
}

const userSchema = new Schema({
  name: {
    type: String,
    required: true,
  },
  email: {
    type: String,
    required: true,
  },
  password: {
    type: String,
    required: true,
  }, …
Run Code Online (Sandbox Code Playgroud)

bcrypt mongoose mongodb node.js typescript

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

标签 统计

node.js ×2

bcrypt ×1

mongodb ×1

mongoose ×1

npm ×1

react-redux ×1

reactjs ×1

typescript ×1