Error with webpack

Error with webpack
0.0 0

#1

Hi. I have tried install react with node with this video -

But when I was trying to run it, I find some mistake:
ERROR in Entry module not found: Error: Can’t resolve ‘D:\react\reactapp.js’ in 'D:\re
act

There is my file:
https://github.com/SerafimPoch/React--error---

npm mod you could see in video.
If you find a solution to fix my problem - please write it.Thank you.


#2

Hi @SerafimPoch

Line 5 of the webpack config, I think you meant to write /app.js


#3

I’ve change but still not working))


#4

try

path.resolve(__dirname, 'react', 'app.js')

same goes for output


#5

Instead of react I wrote entry: path.resolve(__dirname, ‘app.js’) + '’,


#6

I wrote entry: path.resolve(__dirname, ‘app.js’) + “”, something is working. But localhost:1234 still not))


#7

Did you try \app.js? Double check that your path is correct. D:\react\react\app.js

 entry: path.resolve(__dirname, 'react') + '\app.js'

#8

Yes. I just wrote entry: path.resolve(__dirname, ‘app.js’) + “”, and I think it’s working


#9

Is the dev server working?


#10

since you don’t have subfolder with static files, remove publicPath prop.


#11

How can I see work server or not? Sorry for stupid question. Today I’m just starting to use it)


#12

I’ve remove public prop but I have errors.Then I remove all 9 line and erros are gone. Maybe I should change index.html Because I delete publicpath?


#13

I’d suggest you to keep the same folder structure as the one from video tut. You’d have a lot less hassle with setting this thing up.


#14

It’s true :confounded:


#15

Yes.Server is Working.