transport-tracker icon indicating copy to clipboard operation
transport-tracker copied to clipboard

error when try to "npm install" on backend ?

Open ahmedamen opened this issue 5 years ago • 8 comments

Hi Please i try to run this project on my windows 10 laptop so i have create firebase account and added data in the json file as read me file and when i try "npm install" on backend folder i got this erros:

[email protected] install D:\Trans\backend\node_modules\fibers node build.js || nodejs build.js D:\Trans\backend\node_modules\fibers>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. fibers.cc coroutine.cc win_delay_load_hook.cc d:\trans\backend\node_modules\fibers\src\fibers.cc(464): warning C4996: 'v8::String::Utf8Value::Utf8Value': was declared deprecated [D:\Trans\backend
node_modules\fibers\build\fibers.vcxproj] c:\users\ahmed amin.node-gyp\11.1.0\include\node\v8.h(2991): note: see declaration of 'v8::String::Utf8Value::Utf8Value' d:\trans\backend\node_modules\fibers\src\fibers.cc(686): error C2660: 'v8::Script::Compile': function does not take 1 arguments [D:\Trans\backend\node _modules\fibers\build\fibers.vcxproj] c:\users\ahmed amin.node-gyp\11.1.0\include\node\v8.h(1359): note: see declaration of 'v8::Script::Compile' (compiling source file ..\src\fibers.cc ) d:\trans\backend\node_modules\fibers\src\fibers.cc(701): error C2660: 'v8::TryCatch::StackTrace': function does not take 0 arguments [D:\Trans\backend \node_modules\fibers\build\fibers.vcxproj] c:\users\ahmed amin.node-gyp\11.1.0\include\node\v8.h(8872): note: see declaration of 'v8::TryCatch::StackTrace' (compiling source file ..\src\fibe rs.cc) d:\trans\backend\node_modules\fibers\src\fibers.cc(701): error C2672: 'uni::Reset': no matching overloaded function found [D:\Trans\backend\node_modul es\fibers\build\fibers.vcxproj] d:\trans\backend\node_modules\fibers\src\fibers.cc(701): error C2780: 'void uni::Reset(v8::Isolate *,v8::Persistent<T,v8::NonCopyablePersistentTraits< T>> &,v8::Local<T>)': expects 3 arguments - 2 provided [D:\Trans\backend\node_modules\fibers\build\fibers.vcxproj] d:\trans\backend\node_modules\fibers\src\fibers.cc(126): note: see declaration of 'uni::Reset' d:\trans\backend\node_modules\fibers\src\coroutine.cc(138): warning C4552: '!': result of expression not used [D:\Trans\backend\node_modules\fibers\bu ild\fibers.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12) gyp ERR! System Windows_NT 10.0.17763 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release" gyp ERR! cwd D:\Trans\backend\node_modules\fibers gyp ERR! node -v v11.1.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok node-gyp exited with code: 1 Please make sure you are using a supported platform and node version. If you would like to compile fibers on this machine please make sure you have setup your build environment-- Windows + OS X instructions here: https://github.com/nodejs/node-gyp Ubuntu users please run: sudo apt-get install g++ build-essential Alpine users please run: sudo apk add python make g++ 'nodejs' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: node build.js || nodejs build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

so please how can i fix that ?

ahmedamen avatar Nov 05 '18 23:11 ahmedamen

I think the issue is due to old Node.js version used to develop this

vinilprabhu avatar Mar 20 '19 05:03 vinilprabhu

Unfortunately I don't have time to bring this codebase up to date. Sorry!

/cc @amuramoto

domesticmouse avatar Mar 20 '19 07:03 domesticmouse

@domesticmouse Would a downgrade of Node.js work? If so, what version would be required?

frobinsonj avatar Apr 10 '19 18:04 frobinsonj

I think this was built on node 6. I'd strongly suggest bringing it up to speed with the latest node due to security fixes in node and npm.

domesticmouse avatar Apr 10 '19 19:04 domesticmouse

I plan to bring it up to date. It would just be useful to have a working version to start with. Thanks for the help :)

frobinsonj avatar Apr 10 '19 20:04 frobinsonj

@frobinsonj any luck updating the Transport Tracker code-base to current node version?

this would actually be a superb solution if it can be made to work!

cc: @domesticmouse

sankthetester avatar Jun 29 '19 07:06 sankthetester

@domesticmouse | there is any updates ?

AlyRadwan2020 avatar Aug 22 '19 11:08 AlyRadwan2020

see #67 for some first steps to update or https://github.com/googlemaps/transport-tracker/issues/56#issuecomment-530612217 for running in dockerfile.

jpoehnelt avatar Sep 12 '19 00:09 jpoehnelt