0

I'm trying to run my back-end code on the local host. It was functioning perfectly until I added a video into the folder and ran a python program which used the video to output results which should be displayed on the localhost.

Before I ran the python program I installed opencv, python 3 and pip3.

All my other team members have the exact same structure and code and it is working perfectly for them.

After all this, I'm getting is this error:

C:\Third_Year\IBM_project\ibm\back_end>npm start

back-end@0.0.0 start C:\Third_Year\IBM_project\ibm\back_end
node ./bin/www

undefined:1
[{'frame_number': 1, 'roi0': [101.78202823559488, 99.39509279584912, 49.546951219239915, 29.728170731543948], 'intensity0': 80.0, 'roi1': [101.78202823559488, 99.39509279584912, 49.546951219239915, 29.728170731543948], 'intensity1': 157.0},
  ^

SyntaxError: Unexpected token ' in JSON at position 2
    at JSON.parse (<anonymous>)
    at C:\Third_Year\IBM_project\ibm\back_end\routes\IntensityAPI.js:31:19
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! back-end@0.0.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the back-end@0.0.0 start 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!     C:\Users\holly\AppData\Roaming\npm-cache\_logs\2020-03-16T11_03_34_055Z-debug.log

C:\Third_Year\IBM_project\ibm\back_end>

I've tried

  1. Running; npm cache clean --force

  2. Deleting node_modules folder and package-lock.json file by running:

    rm -rf node_modules package-lock.json
    

    Or deleting it manually by going into the directory and right-click > delete / move to trash.

  3. Running; npm install then to start again run; npm start

However this did not fix my problem, any other suggestions?

RobC
  • 22,977
  • 20
  • 73
  • 80
Sue
  • 225
  • 3
  • 9

0 Answers0