neon-bindings / examples

A collection of examples of Neon
324 stars 43 forks source link

Error on Yarn Build #62

Closed jmw992 closed 4 years ago

jmw992 commented 4 years ago

I'm hitting issues on building the examples from the initial yarn step. I'm thinking it may have something to do with my environment.

Error
PS C:\Users\FooPath\examples> yarn yarn install v1.19.0 [1/4] Resolving packages... [2/4] Fetching packages... info fsevents@2.1.2: The platform "win32" is incompatible with this module. info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning "eslint-config-bliss > eslint-plugin-jest > @typescript-eslint/experimental-utils > @typescript-eslint/typescript-estree > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta". [4/4] Building fresh packages... [-/23] ⠐ waiting... [-/23] ⠐ waiting... [-/23] ⠐ waiting... [7/23] ⠈ @amilajack/neon-hello error C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello: Command failed. Exit code: 1 Command: npm run build Arguments: Directory: C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello Output: > @amilajack/neon-hello@1.0.2 build C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello > neon build --release neon info forcing rebuild for new build settings neon info running cargo Compiling memchr v2.3.0 Compiling lazy_static v1.4.0 Compiling regex-syntax v0.6.14 Compiling cc v1.0.50 Compiling cfg-if v0.1.10 Compiling semver-parser v0.7.0 Compiling cslice v0.2.0 Compiling neon-build v0.3.3 Compiling thread_local v1.0.1 Compiling semver v0.9.0 Compiling aho-corasick v0.7.7 Compiling regex v1.3.4 Compiling neon-sys v0.3.3 error: failed to run custom build command for `neon-sys v0.3.3` Caused by: process didn't exit successfully: `C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello\native\target\release\build\neon-sys-3a0909519f5584b3\build-script-build` (exit code: 1) --- stdout 'Skipping node-gyp installation as part of npm install.' added 96 packages from 70 contributors and audited 96 packages in 3.019s found 7 vulnerabilities (3 low, 1 moderate, 3 high) run `npm audit fix` to fix them, or `npm audit` for details cargo:node_arch=x64 cargo:node_root_dir=C:\\Users\\FooUser\\AppData\\Local\\node-gyp\\Cache\\14.15.0 cargo:node_lib_file=C:\\\\Users\\\\FooUser\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\14.15.0\\\\<(target_arch)\\\\node.lib > @ build-release C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello\native\target\x86_64-pc-windows-msvc\release\build\neon-sys-6f1054c46a4ce537\out\native > node-gyp build C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello\native\target\x86_64-pc-windows-msvc\release\build\neon-sys-6f1054c46a4ce537\out\native>if not defined npm_config_node_gyp (node "C:\Users\FooUser\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" build ) else (node "C:\Users\FooUser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" build ) Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch. C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(186,5): error MSB4018: The "GetOutOfDateItems" task failed unexpectedly. [C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello\native\target\x86_64-pc-windows-msvc\release\build\neon-sys-6f1054c46a4ce537\out\native\build\neon.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(186,5): error MSB4018: System.InvalidOperationException: The item metadata "%(FullPath)" cannot be applied to the path "Release\obj\neon\neon.tlog\ParallelCustomBuild.read.1.tlog". Path: Release\obj\neon\neon.tlog\ParallelCustomBuild.read.1.tlog exceeds the OS max path limit. The fully qualified file name must be less than 260 characters. [C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello\native\target\x86_64-pc-windows-msvc\release\build\neon-sys-6f1054c46a4ce537\out\native\build\neon.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(186,5): error MSB4018: at Microsoft.Build.Shared.ErrorUtilities.ThrowInvalidOperation(String resourceName, Object[] args) [C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello\native\target\x86_64-pc-windows-msvc\release\build\neon-sys-6f1054c46a4ce537\out\native\build\neon.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(186,5): error MSB4018: at Microsoft.Build.Shared.FileUtilities.ItemSpecModifiers.GetItemSpecModifier(String currentDirectory, String itemSpec, String definingProjectEscaped, String modifier, String& fullPath) [C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello\native\target\x86_64-pc-windows-msvc\release\build\neon-sys-6f1054c46a4ce537\out\native\build\neon.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(186,5): error MSB4018: at Microsoft.Build.Utilities.TaskItem.Microsoft.Build.Framework.ITaskItem2.GetMetadataValueEscaped(String metadataName) [C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello\native\target\x86_64-pc-windows-msvc\release\build\neon-sys-6f1054c46a4ce537\out\native\build\neon.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(186,5): error MSB4018: at Microsoft.Build.Utilities.TaskItem.GetMetadata(String metadataName) [C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello\native\target\x86_64-pc-windows-msvc\release\build\neon-sys-6f1054c46a4ce537\out\native\build\neon.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(186,5): error MSB4018: at Microsoft.Build.CPPTasks.GetOutOfDateItems.Execute() [C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello\native\target\x86_64-pc-windows-msvc\release\build\neon-sys-6f1054c46a4ce537\out\native\build\neon.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(186,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello\native\target\x86_64-pc-windows-msvc\release\build\neon-sys-6f1054c46a4ce537\out\native\build\neon.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(186,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() [C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello\native\target\x86_64-pc-windows-msvc\release\build\neon-sys-6f1054c46a4ce537\out\native\build\neon.vcxproj] TARGET = Some("x86_64-pc-windows-msvc") HOST = Some("x86_64-pc-windows-msvc") AR_x86_64-pc-windows-msvc = None AR_x86_64_pc_windows_msvc = None HOST_AR = None AR = None running: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX64\\x64\\lib.exe" "-out:C:\\Users\\FooUser\\Documents\\PersonalProjects\\NeonHelloWorld\\examples\\electron-app\\node_modules\\@amilajack\\neon-hello\\native\\target\\x86_64-pc-windows-msvc\\release\\build\\neon-sys-6f1054c46a4ce537\\out\\libneon.a" "-nologo" "C:\\Users\\FooUser\\Documents\\PersonalProjects\\NeonHelloWorld\\examples\\electron-app\\node_modules\\@amilajack\\neon-hello\\native\\target\\x86_64-pc-windows-msvc\\release\\build\\neon-sys-6f1054c46a4ce537\\out\\native\\build\\Release\\obj\\neon\\neon.obj" LINK : fatal error LNK1181: cannot open input file 'C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello\native\target\x86_64-pc-windows-msvc\release\build\neon-sys-6f1054c46a4ce537\out\native\build\Release\obj\neon\neon.obj' exit code: 1181 --- stderr gyp ERR! build error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\FooUser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) gyp ERR! System Windows_NT 10.0.18362 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\FooUser\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" gyp ERR! cwd C:\Users\FooPath\examples\electron-app\node_modules\@amilajack\neon-hello\native\target\x86_64-pc-windows-msvc\release\build\neon-sys-6f1054c46a4ce537\out\native gyp ERR! node -v v14.15.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ build-release: `node-gyp build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ build-release 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\FooUser\AppData\Roaming\npm-cache\_logs\2020-11-09T15_36_34_128Z-debug.log error occurred: Command "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX64\\x64\\lib.exe" "-out:C:\\Users\\FooUser\\Documents\\PersonalProjects\\NeonHelloWorld\\examples\\electron-app\\node_modules\\@amilajack\\neon-hello\\native\\target\\x86_64-pc-windows-msvc\\release\\build\\neon-sys-6f1054c46a4ce537\\out\\libneon.a" "-nologo" "C:\\Users\\FooUser\\Documents\\PersonalProjects\\NeonHelloWorld\\examples\\electron-app\\node_modules\\@amilajack\\neon-hello\\native\\target\\x86_64-pc-windows-msvc\\release\\build\\neon-sys-6f1054c46a4ce537\\out\\native\\build\\Release\\obj\\neon\\neon.obj" with args "lib.exe" did not execute successfully (status code exit code: 1181). warning: build failed, waiting for other jobs to finish... error: build failed neon ERR! cargo build failed Error: cargo build failed at Target. (C:\Users\FooPath\examples\electron-app\node_modules\neon-cli\lib\target.js:121:35) at step (C:\Users\FooPath\examples\electron-app\node_modules\neon-cli\lib\target.js:32:23) at Object.next (C:\Users\FooPath\examples\electron-app\node_modules\neon-cli\lib\target.js:13:53) at fulfilled (C:\Users\FooPath\examples\electron-app\node_modules\neon-cli\lib\target.js:4:58) at processTicksAndRejections (internal/process/task_queues.js:93:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @amilajack/neon-hello@1.0.2 build: `neon build --release` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @amilajack/neon-hello@1.0.2 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I'm seeing node-gyp issues with VS2019 which looks like gyp is trying to use I'll try playing around with different build tools and see if that helps https://github.com/nodejs/node-gyp/issues/1753

Any tips would be appreciated

kjvalencik commented 4 years ago

@jmw992 What is your node version? There is a known issue with Node 15 and Windows. https://github.com/neon-bindings/neon/issues/621

jmw992 commented 4 years ago

@kjvalencik node 14.15.0, and from the linked issue my python version is 3.8.5 when I run python --version on the command line, though I have several versions of python on my machine

jmw992 commented 4 years ago

The issue appears to have been something in my windows environment. I did a full windows reset reinstalled node (with native build tools option), rust, yarn.

I also installed gulp in my global npm and it everything is working now.

A nuclear option but it may be required.