Closed cedon closed 8 years ago
My npm version is 3.5.3
@cedon Try to install something else and show your package.json
@cedon you don't have GraphicsMagic
installed in your system that is a requirement from canvas. This has nothing to do with either gulp-postcss or postcss itself. Maybe some plugin depends on it, so you may ask them how to install it correctly on windows.
I got it in. Apparently gulp-spritesmith was causing all the problems. It was installed with npm install since the package.json was a copy from another WP theme project. The error just decided to manifest itself when I was trying to install PostCSS for covnerting the workflow from SASS.
I zapped the node_modules directory, removed gulp-spritesmith from package.json and PostCSS went right in without a hitch.
Trying to install gulp-postcss for a project and it will not install. I get a series of errors about compiling about msbuild.exe and then it dumps.
Here is the full log of what NPM is doing:
D:\WordPress\themes\jldc_scratch\node_modules\canvas>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) Warning: Missing input files: C:\GTK\bin\zlib1.dll C:\GTK\bin\libexpat-1.dll C:\GTK\bin\libpng14-14.dll C:\GTK\bin\libcairo-2.dll C:\GTK\bin\libfontconfig-1.dll C:\GTK\bin\libfreetype-6.dll Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. Canvas.cc CanvasGradient.cc CanvasPattern.cc CanvasRenderingContext2d.cc color.cc Image.cc ImageData.cc init.cc C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition (compiling source file ..\src\Image.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): note: command-line arguments: see previous definition of 'snprintf' (compiling source file ..\src\Image.cc) C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration (compiling source file ..\src\Image.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition (compiling source file ..\src\Canvas.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): note: command-line arguments: see previous definition of 'snprintf' (compiling source file ..\src\Canvas.cc) C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration (compiling source file ..\src\Canvas.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] PixelArray.cc C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition (compiling source file ..\src\CanvasPattern.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): note: command-line arguments: see previous definition of 'snprintf' (compiling source file ..\src\CanvasPattern.cc) C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration (compiling source file ..\src\CanvasPattern.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition (compiling source file ..\src\CanvasGradient.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): note: command-line arguments: see previous definition of 'snprintf' (compiling source file ..\src\CanvasGradient.cc) C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration (compiling source file ..\src\CanvasGradient.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition (compiling source file ..\src\color.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): note: command-line arguments: see previous definition of 'snprintf' (compiling source file ..\src\color.cc) C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration (compiling source file ..\src\color.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition (compiling source file ..\src\ImageData.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): note: command-line arguments: see previous definition of 'snprintf' (compiling source file ..\src\ImageData.cc) C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration (compiling source file ..\src\ImageData.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition (compiling source file ..\src\init.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): note: command-line arguments: see previous definition of 'snprintf' (compiling source file ..\src\init.cc) C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration (compiling source file ..\src\init.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition (compiling source file ..\src\PixelArray.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): note: command-line arguments: see previous definition of 'snprintf' (compiling source file ..\src\PixelArray.cc) C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration (compiling source file ..\src\PixelArray.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition (compiling source file ..\src\CanvasRenderingContext2d.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1925): note: command-line arguments: see previous definition of 'snprintf' (compiling source file ..\src\CanvasRenderingContext2d.cc) C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration (compiling source file ..\src\CanvasRenderingContext2d.cc) [D:\WordPress\themes\jldc_scratch\node_modules\canvas\build\canvas.vcxproj]
'gm' is not recognized as an internal or external command, operable program or batch file. Invalid drive specification. npm WARN install:gmsmith@0.4.5 gmsmith@0.4.5 preinstall:
gm -version || convert -version
npm WARN install:gmsmith@0.4.5 Exit status 4 gyp ERR! build error gyp ERR! stack Error:C:\Program Files (x86)\MSBuild\14.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:276:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Windows_NT 10.0.10586 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" gyp ERR! cwd D:\WordPress\themes\jldc_scratch\node_modules\canvas gyp ERR! node -v v4.2.1 gyp ERR! node-gyp -v v3.2.1 gyp ERR! not ok npm WARN install:canvas@1.1.6 canvas@1.1.6 install:node-gyp rebuild
npm WARN install:canvas@1.1.6 Exit status 1 npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.6