trufflesuite / drizzle

Reactive Ethereum dapp UI suite
907 stars 238 forks source link

I cannot import GenerateStore #122

Open norasyeezys opened 2 years ago

norasyeezys commented 2 years ago

I have changed the code multiple times, typing each import statement followed by their errors.

import { Drizzle, generateStore } from "drizzle";

Module not found: Can't resolve 'drizzle' in 'C:\Users[]\client\src'

import {generateStore} from 'drizzle/store/src/generateStore'; import {generateStore} from 'drizzle/store/src/'; import * as generateStore from '../node_modules/drizzle/store/src/generateStore'; import { Drizzle, generateStore } from "drizzle/store/src/";

TypeError: Cannot read properties of undefined (reading 'filter') generateContractInitialState C:/Users/[]/client/node_modules/drizzle/store/src/contractStateUtils.js:17 14 | } 15 | 16 | export const generateContractInitialState = contractConfig => {

17 | const constants = getAbi(contractConfig).filter(isGetterFunction) 18 | const objectOfConstants = constants.reduce( 19 | (acc, x) => ({ ...acc, [x.name]: {} }), 20 | {}

import '../node_modules/drizzle/store/src/generateStore'; import 'drizzle/store/src/generateStore';

Line 22:22: 'generateStore' is not defined no-undef