react webpack 启动 Field ‘browser‘ doesn‘t contain a valid ali

在react 脚手架项目中配置webpack , 启动时报错如图

  modules by path ./node_modules/ 1010 KiB
    modules by path ./node_modules/webpack/hot/*.js 4.3 KiB 4 modules
    modules by path ./node_modules/scheduler/ 26.3 KiB 4 modules
    modules by path ./node_modules/react/ 70.6 KiB 2 modules
    modules by path ./node_modules/react-dom/ 875 KiB 2 modules
    modules by path ./node_modules/css-loader/dist/runtime/*.js 3.79 KiB 2 modules
  modules by path ./src/ 3.58 KiB
    modules by path ./src/*.js 937 bytes
      ./src/index.js 542 bytes [built] [code generated]
      ./src/reportWebVitals.js 395 bytes [built] [code generated]
    modules by path ./src/*.css 2.67 KiB
      ./src/index.css 1.32 KiB [built] [code generated]
      ./node_modules/css-loader/dist/cjs.js!./src/index.css 1.35 KiB [built] [code generated]

ERROR in ./src/index.js 4:0-24
Module not found: Error: Can't resolve './App' in 'E:\frontEndProject\test\src'
resolve './App' in 'E:\frontEndProject\test\src'
  using description file: E:\frontEndProject\test\package.json (relative path: ./src)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: E:\frontEndProject\test\package.json (relative path: ./src/App)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        E:\frontEndProject\test\src\App doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        E:\frontEndProject\test\src\App.js doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        E:\frontEndProject\test\src\App.json doesn't exist
      .wasm
        Field 'browser' doesn't contain a valid alias configuration
        E:\frontEndProject\test\src\App.wasm doesn't exist
      as directory
        E:\frontEndProject\test\src\App doesn't exist

 

评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值