erda-project/erda-ui

npm run watch出现问题

Closed this issue · 1 comments

njxz commented

环境: redhat ,win10
node版本:16.13.1
运行erda-ui init,core: npm run build后,在shell:// npm run watch下遇到如下报错

D:\project\erda-ui\shell>npm run watch

> @erda-ui/shell@1.5.0 watch
> cross-env-shell NODE_ENV=development 'webpack --progress --color -w'

================ remotes: =================
 {
  core: 'mf_core@/static/core/scripts/mf_core.js',
  admin: 'mf_admin@/static/admin/scripts/mf_admin.js',
  fdp: 'mf_fdp@/static/fdp/scripts/mf_fdp.js'
}
isProd: false v16.13.1
Installing shortcut: "C:\\Users\\hp\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\SnoreToast.lnk" "D:\\project\\erda-ui\\node_modules\\.pnpm\\node-notifier@9.0.0\\node_modules\\node-notifier\\vendor\\snoreToast\\snoretoast-x64.exe" Snore.DesktopToasts
10% building 0/2 entries 2260/2260 dependencies 62/903 modules[BABEL] Note: The code generator has deoptimised the styling of D:\project\erda-ui\node_modules\.pnpm\ace-builds@1.4.12\node_modules\ace-builds\src-noconflict\ace.js as it exceeds the max of 500KB.
13% building 0/2 entries 4591/4600 dependencies 286/1596 modulesBrowserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
16% building 0/2 entries 5789/5800 dependencies 558/1854 modules[BABEL] Note: The code generator has deoptimised the styling of D:\project\erda-ui\node_modules\.pnpm\lodash@4.17.21\node_modules\lodash\lodash.js as it exceeds the max of 500KB.
18% building 0/2 entries 6570/6600 dependencies 773/2093 modules[BABEL] Note: The code generator has deoptimised the styling of D:\project\erda-ui\node_modules\.pnpm\react-dom@16.14.0_react@16.14.0\node_modules\react-dom\cjs\react-dom.development.js as it exceeds the max of 500KB.
assets by path scripts/*.js 131 MiB
  assets by chunk 70.2 MiB (id hint: vendors) 90 assets
assets by path images/ 1.16 MiB
  assets by path images/*.svg 1020 KiB 51 assets
  assets by path images/*.png 162 KiB 12 assets
  asset images/favicon.0a1e6f6d21957d1e5c5f2dcacddc2c47.ico 7.54 KiB [emitted] [immutable] [from: app/static/favicon.ico]
assets by path ../ 805 KiB
  assets by path ../empty-holder/*.svg 15.7 KiB 5 assets
  assets by path ../*.js 572 KiB 3 assets
  assets by path ../*.xmind 140 KiB 2 assets
  assets by path ../*.xlsx 42 KiB 2 assets
  asset ../roboto-regular.ttf 27.5 KiB [emitted] [from: app/static/roboto-regular.ttf] [copied]
  asset ../favicon.ico 7.54 KiB [emitted] [from: app/static/favicon.ico] [copied]
asset index.html 6.08 KiB [emitted]
Entrypoint app 96 KiB = scripts/app.js
Entrypoint mf_share 108 KiB = scripts/mf_share.js
orphan modules 50.5 KiB [orphan] 36 modules
runtime modules 96.8 KiB 35 modules
modules by path ../ 25 MiB
  javascript modules 24.9 MiB 2619 modules
  json modules 128 KiB 8 modules
modules by path ./app/ 7.98 MiB 2318 modules
provide-module modules 1.68 KiB
  modules by path provide shared module (default) @erda-ui/ 84 bytes 2 modules
remote-module modules 72 bytes (remote) 72 bytes (share-init)
  modules by path remote core/ 60 bytes (remote) 60 bytes (share-init) 3 modules
  2 modules
consume-shared-module modules 168 bytes 4 modules
asset modules 16.3 KiB 3 modules
7 modules

ERROR in ./app/App-vite.tsx 79:596-627
Module not found: Error: Can't resolve './modules/extra/entry' in 'D:\project\erda-ui\shell\app'
resolve './modules/extra/entry' in 'D:\project\erda-ui\shell\app'
  using description file: D:\project\erda-ui\shell\package.json (relative path: ./app)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: D:\project\erda-ui\shell\package.json (relative path: ./app/modules/extra/entry)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        D:\project\erda-ui\shell\app\modules\extra\entry doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        D:\project\erda-ui\shell\app\modules\extra\entry.js doesn't exist
      .jsx
        Field 'browser' doesn't contain a valid alias configuration
        D:\project\erda-ui\shell\app\modules\extra\entry.jsx doesn't exist
      .tsx
        Field 'browser' doesn't contain a valid alias configuration
        D:\project\erda-ui\shell\app\modules\extra\entry.tsx doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        D:\project\erda-ui\shell\app\modules\extra\entry.ts doesn't exist
      .d.ts
        Field 'browser' doesn't contain a valid alias configuration
        D:\project\erda-ui\shell\app\modules\extra\entry.d.ts doesn't exist
      as directory
        D:\project\erda-ui\shell\app\modules\extra\entry doesn't exist
 @ ./app/index.js 14:2-22

ERROR in ./app/App.tsx 78:596-627
Module not found: Error: Can't resolve './modules/extra/entry' in 'D:\project\erda-ui\shell\app'
resolve './modules/extra/entry' in 'D:\project\erda-ui\shell\app'
  using description file: D:\project\erda-ui\shell\package.json (relative path: ./app)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: D:\project\erda-ui\shell\package.json (relative path: ./app/modules/extra/entry)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        D:\project\erda-ui\shell\app\modules\extra\entry doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        D:\project\erda-ui\shell\app\modules\extra\entry.js doesn't exist
      .jsx
        Field 'browser' doesn't contain a valid alias configuration
        D:\project\erda-ui\shell\app\modules\extra\entry.jsx doesn't exist
      .tsx
        Field 'browser' doesn't contain a valid alias configuration
        D:\project\erda-ui\shell\app\modules\extra\entry.tsx doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        D:\project\erda-ui\shell\app\modules\extra\entry.ts doesn't exist
      .d.ts
        Field 'browser' doesn't contain a valid alias configuration
        D:\project\erda-ui\shell\app\modules\extra\entry.d.ts doesn't exist
      as directory
        D:\project\erda-ui\shell\app\modules\extra\entry doesn't exist
 @ ./app/index.js 16:2-17

webpack 5.63.0 compiled with 2 errors in 131211 ms

@njxz 此问题已修复,请更新master分支后再试下