首先,我知道我們應該發佈完整且可重複的問題。 但是,我正在做一個完整的堆Redux教程(http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html), 和我接近結束,這意味着我有很多文件和邏輯已經實現。 由於這個原因,我把我的項目加載到github上,這是公開的(https://github.com/rafaelmarques7/voting_app_tutorial)。這樣,很容易看到項目結構和文件,甚至克隆項目並重現錯誤。無法識別入口點:無法解析'文件'或'目錄''./src/index.js'
因此,這裏的問題 當我運行NPM運行dev的,我得到了以下錯誤:
ERROR in multi main Module not found: Error: Cannot resolve 'file' or 'directory' ./src/index.js in C:\Users\Y\Desktop\sketches\voting_app\client_side
@ multi main
和有關的WebPack
ERROR in (webpack)-dev-server Module not found: Error: Cannot resolve module 'sockjs-client' in
C:\Users\Y\Desktop\sketches\voting_app\client_side\node_modules\webpack-dev-server\client
@ (webpack)-dev-server
ERROR in (webpack)-dev-server/client? Module not found: Error: Cannot resolve 'file' or 'directory'
C:\Users\Y\Desktop\sketches\voting_app\client_side\node_modules\url\url.js in
C:\Users\Y\Desktop\sketches\voting_app\client_side\node_modules\webpack-dev-server\client
@ (webpack)-dev-server/client? 1:10-24
我居然廣泛試圖解決這個錯誤,搜索stackoverflow和github相關的問題,但是沒有一個解決方案能夠解決我的錯誤。
有什麼建議嗎? 我真的很感謝幫助!
它finnaly編譯! 你救了我的命,非常感謝你! –