ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Bug]: npm ERR! code 1 npm ERR! path /home/leiwei/programs/ragflow/web npm ERR! command failed npm ERR! command sh -c umi setup

Open Weishaoya opened this issue 1 year ago • 2 comments

Is there an existing issue for the same bug?

  • [X] I have checked the existing issues.

Branch name

main

Commit ID

the latest code

Other environment information

OS: ubuntu 22.04
python: 3.11

Actual behavior

I need to Launch the service from source. When I run the commad "npm install --registry=https://registry.npmmirror.com --force", the bug was occurred.

Expected behavior

I want to solve the bug, how can I do? Thank you.

Steps to reproduce

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:85:18)
    at Object.<anonymous> (/home/leiwei/programs/ragflow/web/node_modules/@umijs/utils/dist/index.js:76:28)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
npm ERR! code 1
npm ERR! path /home/leiwei/programs/ragflow/web
npm ERR! command failed
npm ERR! command sh -c umi setup

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/lw03-10052696/.npm/_logs/2024-09-14T02_41_32_269Z-debug-0.log

Additional information

No response

Weishaoya avatar Sep 14 '24 03:09 Weishaoya

Run npm install directly in the web directory

image

cike8899 avatar Sep 14 '24 06:09 cike8899

Run npm install directly in the web directory

image

Thank you! I was running nodejs version 12, and the bug was fixed when I upgraded it to version 18.

Weishaoya avatar Sep 15 '24 02:09 Weishaoya