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

Module not found: Error: Can't resolve './aboutPageReducer' in ...... #68

Closed
mikejamesowen opened this issue Feb 6, 2019 · 1 comment

Comments

@mikejamesowen
Copy link

Hi Guys,

I am not sure if this is the right place to post this, apologies if not, but I have completed all the steps in the README (I think!), and am using webpack / webpack-cli as my bundler.

However when I run 'npm run webpack' from the Mac Terminal I get the error:
ERROR in ./src/redux/index.js
Module not found: Error: Can't resolve './aboutPageReducer' in '/Users/mike/code/mjo-react-website/src/redux'
@ ./src/redux/index.js 4:0-57 4:0-57
@ ./src/react-website.js
@ ./src/index.js

This is preceded by what looks like all good messages beforehand as follows:

mjo-react-website@1.0.0 webpack /Users/mike/code/mjo-react-website
webpack

Hash: 83fe3e686dd57c2cfe3e
Version: webpack 4.29.2
Time: 923ms
Built at: 06/02/2019 15:51:09
Asset Size Chunks Chunk Names
bundle.js 946 KiB main [emitted] main
Entrypoint main = bundle.js
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {main} [built]
[./node_modules/webpack/buildin/harmony-module.js] (webpack)/buildin/harmony-module.js 573 bytes {main} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {main} [built]
[./src/index.js] 130 bytes {main} [built]
[./src/react-website.js] 213 bytes {main} [built]
[./src/redux/index.js] 211 bytes {main} [built]
[./src/routes.js] 278 bytes {main} [built] [failed] [1 error]
+ 390 hidden modules

But the last 'good' message said [1 error]. Having looked a bit closer at the file ./src/routes.js however, if I mouse over just before 'react-website' on the second line I do get the message:
[ts]
Could not find a declaration file for module 'react-website'. '/Users/mike/code/mjo-react-website/node_modules/react-website/index.commonjs.js' implicitly has an 'any' type.
Try npm install @types/react-website if it exists or add a new declaration (.d.ts) file containing declare module 'react-website'; [7016]

Is my issue related to this, or am I barking up the wrong tree?

Thanks, Mike.

@catamphetamine
Copy link
Owner

Of course, because ./aboutPageReducer in the readme in the example is just an example: it implies that you already have some ./aboutPageReducer reducer.
If this topic is too complex for you then look at Next.js framework because it's much simpler.

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

2 participants