[BUG] Cannot use npm install
BenDol opened this issue · comments
Describe the bug
When I run npm install
it fails with an error (see attached for more details)
To Reproduce
No Idea if this is a unique issue or it it's repeatable. Just fresh install the server npm?
See error
3760 error code 1
3761 error path C:\Projects\runejs\server\node_modules\canvas
3762 error command failed
3763 error command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
3764 error Warning: Missing input files:
3764 error C:\GTK\bin\libpng14-14.dll
3764 error C:\GTK\bin\libintl-8.dll
3764 error C:\GTK\bin\libpangoft2-1.0-0.dll
3764 error C:\GTK\bin\libcairo-2.dll
3764 error C:\GTK\bin\libpangowin32-1.0-0.dll
3764 error C:\GTK\bin\libfontconfig-1.dll
3764 error C:\GTK\bin\libgmodule-2.0-0.dll
3764 error C:\GTK\bin\libexpat-1.dll
3764 error C:\GTK\bin\libpangocairo-1.0-0.dll
3764 error C:\GTK\bin\zlib1.dll
3764 error C:\GTK\bin\libgobject-2.0-0.dll
3764 error C:\GTK\bin\libpango-1.0-0.dll
3764 error C:\GTK\bin\libfreetype-6.dll
3764 error C:\GTK\bin\libglib-2.0-0.dll
3764 error C:\GTK\bin\libgthread-2.0-0.dll
3764 error Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
3764 error Backend.cc
3764 error c:\projects\runejs\server\node_modules\canvas\src\backend\backend.h(3): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory [C:\Projects\runejs\server\node_modules\canvas\build\canvas.vcxproj]
Hey, this is not an issue on our end but most likely something to do with your npm version, cache or a the package itself on your node version (support issue).
- run:
npm cache clean --force
- delete
node_modules
- run:
npm install
Also try to update your node version or install the additional tools for nodejs
from the Windows Start menu (in node.js folder) if those are missing or we're installed manually.
Sorry for any inconvinience you're having with npm but it's wlnot within our control :/ We'll be adding a min required node version in our readme from now on!
PS: feel free to reply, if issues persist I might re-open the issue and invesigate further if needed.
I had to follow this https://github.com/Automattic/node-canvas/wiki/Installation:-Windows
Then change the npm msvs version npm config set msvs_version 2019
Perhaps the installation guide could be updated to accommodate this requirement?