Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When building: «Cannot find module 'react'» #37

Closed
kolinko opened this issue Apr 26, 2017 · 3 comments
Closed

When building: «Cannot find module 'react'» #37

kolinko opened this issue Apr 26, 2017 · 3 comments

Comments

@kolinko
Copy link

kolinko commented Apr 26, 2017

I cloned the repo, and I'm trying to build it locally. But when doing "make" I get:


ERROR in ./components/settings.tsx
(1,24): error TS2307: Cannot find module 'react'.

ERROR in ./components/settings.tsx
(2,25): error TS2307: Cannot find module 'react-redux'.
@jbebe
Copy link

jbebe commented Jul 26, 2017

Steps to reproduce problem:

>>> git clone https://github.com/jordwest/news-feed-eradicator.git
Cloning into 'news-feed-eradicator'...
remote: Counting objects: 506, done.
remote: Total 506 (delta 0), reused 0 (delta 0), pack-reused 506
Receiving objects: 100% (506/506), 1.98 MiB | 1.72 MiB/s, done.
Resolving deltas: 100% (224/224), done.
Checking connectivity... done.
>>> cd news-feed-eradicator/
>>> make install
yarn install
yarn install v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.0.14: The platform "linux" is incompatible with this module.
info "fsevents@1.0.14" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 17.17s.
>>> make chrome
BROWSER=chrome NODE_ENV=production /mnt/d/DEV/news-feed-eradicator/node_modules/.bin/webpack
Building chrome extension
ts-loader: Using typescript@1.8.10 and /mnt/d/DEV/news-feed-eradicator/tsconfig.json
Hash: cc6a49f152100cce1daa
Version: webpack 1.13.2
Time: 5607ms
        Asset       Size  Chunks             Chunk Names
manifest.json  937 bytes          [emitted]
   icon16.jpg  732 bytes          [emitted]   not exist on type 'QuoteDisplay'.
   icon48.jpg    1.91 kB          [emitted]
  icon128.jpg    6.49 kB          [emitted]
 eradicate.js     780 kB       0  [emitted]  eradicatet on type 'QuoteDisplay'.
 intercept.js    3.06 kB       1  [emitted]  intercept
eradicate.css    3.31 kB       0  [emitted]  eradicate
    + 219 hidden modulesProperty 'props' does not exist on type 'QuoteDisplay'.

ERROR in ./components/settings.tsxicator/src/store/index.ts
(1,24): error TS2307: Cannot find module 'react'.

ERROR in ./components/settings.tsxicator/src/store/index.ts
(2,25): error TS2307: Cannot find module 'react-redux'.

ERROR in ./components/settings.tsxicator/src/store/index.ts
(11,9): error TS2339: Property 'props' does not exist on type 'Settings'.).

ERROR in ./components/settings.tsxicator/src/store/index.ts
(20,24): error TS2339: Property 'props' does not exist on type 'Settings'. any' is not assignable to parameter of type '
Action'.
ERROR in ./components/settings.tsxpe '(dispatch: any, getState: any) => any'.
(21,25): error TS2339: Property 'props' does not exist on type 'Settings'.
ERROR in /mnt/d/DEV/news-feed-eradicator/src/lib/remove-news-feed.ts
ERROR in ./components/settings.tsxorEach' does not exist on type 'NodeListOf<Element>'.
(28,27): error TS2339: Property 'props' does not exist on type 'Settings'.
ERROR in /mnt/d/DEV/news-feed-eradicator/src/lib/remove-news-feed.ts
ERROR in ./components/settings.tsxorEach' does not exist on type 'NodeListOf<Element>'.
(29,23): error TS2339: Property 'props' does not exist on type 'Settings'.
ERROR in /mnt/d/DEV/news-feed-eradicator/src/lib/inject-ui.ts
ERROR in ./components/settings.tsxname 'require'.
(30,24): error TS2339: Property 'props' does not exist on type 'Settings'.
ERROR in /mnt/d/DEV/news-feed-eradicator/src/lib/inject-ui.ts
ERROR in ./components/settings.tsxname 'require'.
(33,13): error TS2339: Property 'props' does not exist on type 'Settings'.
ERROR in /mnt/d/DEV/news-feed-eradicator/src/lib/inject-ui.ts
ERROR in ./components/settings.tsxmodule 'react-redux'.
(35,22): error TS2339: Property 'props' does not exist on type 'Settings'.
ERROR in /mnt/d/DEV/news-feed-eradicator/src/lib/inject-ui.ts
ERROR in ./components/settings.tsxname 'require'.
(40,13): error TS2339: Property 'props' does not exist on type 'Settings'.
        + 2 hidden modules
ERROR in ./components/settings.tsx
(41,21): error TS2339: Property 'props' does not exist on type 'Settings'. .)
updating: eradicate.css (deflated 70%)
ERROR in ./components/quote-display.tsx
(1,24): error TS2307: Cannot find module 'react'.
updating: icon16.jpg (deflated 14%)
ERROR in ./components/quote-display.tsx
(2,25): error TS2307: Cannot find module 'react-redux'.
updating: manifest.json (deflated 63%)
ERROR in ./components/quote-display.tsxr$
(25,8): error TS2339: Property 'state' does not exist on type 'EditingPanel'.

ERROR in ./components/quote-display.tsx
(29,33): error TS2339: Property 'state' does not exist on type 'EditingPanel'.

ERROR in ./components/quote-display.tsx
(30,29): error TS2339: Property 'props' does not exist on type 'EditingPanel'.

ERROR in ./components/quote-display.tsx
(33,9): error TS2339: Property 'setState' does not exist on type 'EditingPanel'.

ERROR in ./components/quote-display.tsx
(37,9): error TS2339: Property 'setState' does not exist on type 'EditingPanel'.

ERROR in ./components/quote-display.tsx
(41,9): error TS2339: Property 'props' does not exist on type 'EditingPanel'.

ERROR in ./components/quote-display.tsx
(41,28): error TS2339: Property 'state' does not exist on type 'EditingPanel'.

ERROR in ./components/quote-display.tsx
(41,45): error TS2339: Property 'state' does not exist on type 'EditingPanel'.

ERROR in ./components/quote-display.tsx
(70,8): error TS2339: Property 'state' does not exist on type 'QuoteDisplay'.

ERROR in ./components/quote-display.tsx
(81,9): error TS2339: Property 'setState' does not exist on type 'QuoteDisplay'.

ERROR in ./components/quote-display.tsx
(82,27): error TS2339: Property 'state' does not exist on type 'QuoteDisplay'.

ERROR in ./components/quote-display.tsx
(88,9): error TS2339: Property 'props' does not exist on type 'QuoteDisplay'.

ERROR in ./components/quote-display.tsx
(93,9): error TS2339: Property 'props' does not exist on type 'QuoteDisplay'.

ERROR in ./components/quote-display.tsx
(98,9): error TS2339: Property 'setState' does not exist on type 'QuoteDisplay'.

ERROR in ./components/quote-display.tsx
(102,9): error TS2339: Property 'setState' does not exist on type 'QuoteDisplay'.

ERROR in ./components/quote-display.tsx
(106,9): error TS2339: Property 'setState' does not exist on type 'QuoteDisplay'.

ERROR in ./components/quote-display.tsx
(107,9): error TS2339: Property 'props' does not exist on type 'QuoteDisplay'.

ERROR in ./components/quote-display.tsx
(114,13): error TS2339: Property 'state' does not exist on type 'QuoteDisplay'.

ERROR in ./components/quote-display.tsx
(114,43): error TS2339: Property 'state' does not exist on type 'QuoteDisplay'.

ERROR in ./components/quote-display.tsx
(124,12): error TS2339: Property 'state' does not exist on type 'QuoteDisplay'.

ERROR in ./components/quote-display.tsx
(129,45): error TS2339: Property 'props' does not exist on type 'QuoteDisplay'.

ERROR in ./components/quote-display.tsx
(130,48): error TS2339: Property 'props' does not exist on type 'QuoteDisplay'.

ERROR in ./store/index.ts
(2,21): error TS2304: Cannot find name 'require'.

ERROR in ./store/index.ts
(5,19): error TS2307: Cannot find module 'redux-thunk'.

ERROR in ./store/index.ts
(10,32): error TS2314: Generic type 'Store<S>' requires 1 type argument(s).

ERROR in ./store/index.ts
(31,20): error TS2345: Argument of type '(dispatch: any, getState: any) => any' is not assignable to parameter of type 'Action'.
  Property 'type' is missing in type '(dispatch: any, getState: any) => any'.

ERROR in ./lib/remove-news-feed.ts
(23,48): error TS2339: Property 'forEach' does not exist on type 'NodeListOf<Element>'.

ERROR in ./lib/remove-news-feed.ts
(24,47): error TS2339: Property 'forEach' does not exist on type 'NodeListOf<Element>'.

ERROR in ./lib/inject-ui.ts
(1,13): error TS2304: Cannot find name 'require'.

ERROR in ./lib/inject-ui.ts
(2,16): error TS2304: Cannot find name 'require'.

ERROR in ./lib/inject-ui.ts
(5,26): error TS2307: Cannot find module 'react-redux'.

ERROR in ./lib/inject-ui.ts
(7,26): error TS2304: Cannot find name 'require'.
Child extract-text-webpack-plugin:
        + 2 hidden modules
mkdir -p dist/chrome
(cd build/chrome && zip -r ../../dist/chrome/NewsFeedEradicator_v1.0.4.zip .)
  adding: eradicate.css (deflated 70%)
  adding: eradicate.js (deflated 78%)
  adding: icon128.jpg (deflated 5%)
  adding: icon16.jpg (deflated 14%)
  adding: icon48.jpg (deflated 3%)
  adding: intercept.js (deflated 67%)
  adding: manifest.json (deflated 63%)

The problem must be around the typescript config.
'module: CommonJS' must be used when node_module is present but that exists in the config.
I later put 'moduleResolution': true in the config but nothing changed.

@jordwest jordwest added this to the v1.1 - Multi-browser support milestone Nov 28, 2017
@jordwest
Copy link
Owner

I'm planning to remove React in #48, which should fix this.

@jordwest
Copy link
Owner

React has now been replaced with Snabbdom in #48, closing this for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants