SUSTechPOINTS icon indicating copy to clipboard operation
SUSTechPOINTS copied to clipboard

fail to "npm run build" in fusion-branch

Open cheng-FA opened this issue 1 year ago • 3 comments

I try to install fusion branch,but I got this this problem at npm run build

[email protected] build /home/fan/apk_dir/SUSTechPOINTS

react-scripts build

/home/fan/apk_dir/SUSTechPOINTS/node_modules/eslint-webpack-plugin/node_modules/jest-worker/build/index.js:110 _ending; ^ SyntaxError: Unexpected token ; at Module._compile (internal/modules/cjs/loader.js:723:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (/home/fan/apk_dir/SUSTechPOINTS/node_modules/eslint-webpack-plugin/dist/getESLint.js:9:5) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build: react-scripts build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/fan/.npm/_logs/2023-11-16T09_00_31_302Z-debug.log

Here are details of log file: 0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle [email protected]~prebuild: [email protected] 6 info lifecycle [email protected]~build: [email protected] 7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~build: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/fan/apk_dir/SUSTechPOINTS/node_modules/.bin:/home/fan/anaconda3/envs/ros_ws/bin:/home/fan/anaconda3/condabin:/usr/local/cuda-11.8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 9 verbose lifecycle [email protected]~build: CWD: /home/fan/apk_dir/SUSTechPOINTS 10 silly lifecycle [email protected]~build: Args: [ '-c', 'react-scripts build' ] 11 silly lifecycle [email protected]~build: Returned: code: 1 signal: null 12 info lifecycle [email protected]~build: Failed to exec build script 13 verbose stack Error: [email protected] build: react-scripts build 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:198:13) 13 verbose stack at ChildProcess. (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:198:13) 13 verbose stack at maybeClose (internal/child_process.js:982:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 14 verbose pkgid [email protected] 15 verbose cwd /home/fan/apk_dir/SUSTechPOINTS 16 verbose Linux 5.15.0-88-generic 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build" 18 verbose node v10.19.0 19 verbose npm v6.14.4 20 error code ELIFECYCLE 21 error errno 1 22 error [email protected] build: react-scripts build 22 error Exit status 1 23 error Failed at the [email protected] build script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

I really want to know what the cause of the problem is and how to solve it. Look forward for your reply!

cheng-FA avatar Nov 16 '23 09:11 cheng-FA

It seems not a problem with the source code, did you run npm install before build, or please try with a newer version of npm

naurril avatar Nov 16 '23 15:11 naurril

Now I fixed the npm run build problem,but when I run python main.py ,I just got another error . error detials: Traceback (most recent call last): File "main.py", line 6, in logging.basicConfig(filename='./logs/sustechpoints.log', File "/home/fan/anaconda3/envs/ros_ws/lib/python3.8/logging/init.py", line 1988, in basicConfig h = FileHandler(filename, mode) File "/home/fan/anaconda3/envs/ros_ws/lib/python3.8/logging/init.py", line 1147, in init StreamHandler.init(self, self._open()) File "/home/fan/anaconda3/envs/ros_ws/lib/python3.8/logging/init.py", line 1176, in _open return open(self.baseFilename, self.mode, encoding=self.encoding) FileNotFoundError: [Errno 2] No such file or directory: '/home/fan/apk_dir/SUSTechPOINTS/logs/sustechpoints.log' ----------- I do not understand , Did this logs folder needed to be create by myself? ----------- Do you know the reason of this problem? Look forward for your reply.

cheng-FA avatar Nov 17 '23 03:11 cheng-FA

Yes you need to create the logs folder.
Maybe we could add a line of code creating it automatically.

naurril avatar Nov 17 '23 08:11 naurril