Skip to content
This repository was archived by the owner on Feb 27, 2019. It is now read-only.

Cannot find module '~react-redux~redux' error in the generated react-typescript todo app #70

@zoltan-nz

Description

@zoltan-nz

Description

The generated default todo project doesn't compile. Using latest yo (1.8.5) and generator-fountain (1.0.0-rc2). It looks, the generated module string is wrong.

Error Message & Stack Trace

Error when trying to run the default gulp task:

ERROR in ./src/index.tsx
(3,22): error TS2307: Cannot find module '~react-redux~redux'.

ERROR in ./src/app/containers/App.tsx
(2,25): error TS2307: Cannot find module '~react-redux~redux'.

ERROR in ./src/app/containers/App.tsx
(60,3): error TS2345: Argument of type 'typeof App' is not assignable to parameter of type 'ComponentClass<{ todos: any; } & { actions: { addTodo: (text: string) => { type: string; text: st...'.
  Type 'typeof App' is not assignable to type 'StatelessComponent<{ todos: any; } & { actions: { addTodo: (text: string) => { type: string; text...'.
    Type 'typeof App' provides no match for the signature '(props: { todos: any; } & { actions: { addTodo: (text: string) => { type: string; text: string; }; deleteTodo: (id: number) => { type: string; id: number; }; editTodo: (id: number, text: string) => { type: string; id: number; text: string; }; completeTodo: (id: number) => { type: string; id: number; }; completeAll: () => { type: string; }; clearCompleted: () => { type: string; }; }; } & { children?: ReactNode; }, context?: any): ReactElement<any>'

Config

Copy the content from .yo-rc.json:

{
  "generator-fountain-react": {
    "version": "1.0.0-rc2",
    "props": {
      "framework": "react",
      "modules": "webpack",
      "js": "typescript",
      "ci": [
        "travis"
      ],
      "css": "scss",
      "resolved": "/Users/zoltan/.nvm/versions/node/v6.9.2/lib/node_modules/generator-fountain-webapp/node_modules/generator-fountain-react/generators/app/index.js",
      "namespace": "fountain-react",
      "argv": {
        "remain": [],
        "cooked": [],
        "original": []
      },
      "sample": "todoMVC",
      "router": "router"
    }
  }
}

Environment

Tell us which operating system you are using, as well as which versions of Node.js, npm, and yo. Run the following to get it quickly:

$ node -e "var os=require('os');console.log('Node.js ' + process.version + '\n' + os.platform() + ' ' + os.release())"

Node.js v6.9.2
darwin 16.3.0

$ yo --version
1.8.5

$ npm --version
4.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions