请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

webpack 生成 bundle.js出错

//szimg.mukewang.com/596f0ef90001a0c909870340.jpg


//szimg.mukewang.com/596f0f3d0001cb4810210785.jpg


老师你好,我在生成bundle.js这个文件那个步骤出现问题,就是输入webpack之后就提示:

ERROR in Entry module not found: Error: Can't resolve './src/js/root.js' in '/Users/yindeyong/Desktop/reactcode/reactchatroom'


当我输入:webpack --display-error-details

之后又是更详细的报错:

ERROR in Entry module not found: Error: Can't resolve './src/js/root.js' in '/Users/yindeyong/Desktop/reactcode/reactchatroom'

resolve './src/js/root.js' in '/Users/yindeyong/Desktop/reactcode/reactchatroom'

  using description file: /Users/yindeyong/Desktop/reactcode/reactchatroom/package.json (relative path: .)

    Field 'browser' doesn't contain a valid alias configuration

  after using description file: /Users/yindeyong/Desktop/reactcode/reactchatroom/package.json (relative path: .)

    using description file: /Users/yindeyong/Desktop/reactcode/reactchatroom/package.json (relative path: ./src/js/root.js)

      no extension

        Field 'browser' doesn't contain a valid alias configuration

        /Users/yindeyong/Desktop/reactcode/reactchatroom/src/js/root.js doesn't exist

      .js

        Field 'browser' doesn't contain a valid alias configuration

        /Users/yindeyong/Desktop/reactcode/reactchatroom/src/js/root.js.js doesn't exist

      .json

        Field 'browser' doesn't contain a valid alias configuration

        /Users/yindeyong/Desktop/reactcode/reactchatroom/src/js/root.js.json doesn't exist

      as directory

        /Users/yindeyong/Desktop/reactcode/reactchatroom/src/js/root.js doesn't exist


请问下该怎么处理!谢谢!

正在回答 回答被采纳积分+3

1回答

提问者 永不止息L 2017-07-19 23:55:45

已解决!

登录后可查看完整回答登录/注册
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信