ERROR in main Module not found: Error: Can't resolve './src' in #16028
-
Hello! This is the first time I am using webpack. I decided to use it instead of create-react-app, but right now I am facing what seems to be a very difficult problem with webpack: I am getting the following error:
And here is the screenshot: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
instead of https://github.com/Yokubjon-J/chat-app/blob/no-cra/webpack.config.client.production.js#L29 you should btw if function does nothing you can |
Beta Was this translation helpful? Give feedback.
-
I guess that the error is caused because webpack is not generating bundle.js should be generated at this line https://github.com/Yokubjon-J/chat-app/blob/no-cra/server/devBundle.js#L8 of @vankop could you please point out why webpack is not generating |
Beta Was this translation helpful? Give feedback.
-
经过我运行你的项目 我发现在经过compile函数的时候 获取的webpackconfig 配置是空的 进而报错。 当我修改完毕后 你的webpack.config.client文件的配置 传递给webpack函数 配置会报错 现在没有具体发现是哪一行。 但是你上边贴图的错算是解决了 。 因此对于你上边的图报错 原因就是 传递给webpack参数为{} 。 After I run your project, I find that the ‘webpackConfig’ parameter obtained when I pass the compile function is empty, and then an error is reported. When I finish modifying your webpack config. When the configuration of the client file is passed to the webpack function, an error will be reported. At present, no specific line of configuration has been found. But the mistake of your upper mapping is solved. Therefore, the reason for the error in the above figure is that the parameter passed to webpack is {}. |
Beta Was this translation helpful? Give feedback.
经过我运行你的项目 我发现在经过compile函数的时候 获取的webpackconfig 配置是空的 进而报错。 当我修改完毕后 你的webpack.config.client文件的配置 传递给webpack函数 配置会报错 现在没有具体发现是哪一行。 但是你上边贴图的错算是解决了 。 因此对于你上边的图报错 原因就是 传递给webpack参数为{} 。
After I run your project, I find that the ‘webpackConfig’ parameter obtained when I pass the compile function is empty, and then an error is reported. When I finish modifying your webpack config. When the configuration of the client file is passed to the webpack function, an error will be reported. At present, no specific line of configuration has been found. But the mistake of your upper mapping is solved. Therefore, the reason for the error in the above figure is that the parameter passed to webpack is {}.