NodeRT icon indicating copy to clipboard operation
NodeRT copied to clipboard

Failed to build windows.applicationmodel.store

Open goldfire opened this issue 7 years ago • 3 comments

I cloned master and built the latest NodeRT, but running the following command still fails to build the module for Windows 10 (it doesn't work from npm either). I'm building this for Electron, but just building normally failed with the same errors.

node-gyp configure
node-gyp rebuild --msvs_version=2015 --dist-url=https://github.com/electron/electron/release

s/download/v2.0.4/electron-v2.0.4-win32-x64.zip

The output of the build:

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Python27\python.EXE
gyp info spawn args [ 'C:\\Users\\James\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=2015',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\James\\Desktop\\NodeRT-master\\src\\NodeRTUI\\bin\\Debug\\output\\windows.applicationmodel.store\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\James\\Desktop\\NodeRT-master\\src\\NodeRTUI\\bin\\Debug\\output\\windows.applicationmodel.store\\common.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\James\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\James\\.node-gyp\\8.11.3\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\James\\.node-gyp\\8.11.3',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\James\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\Users\\James\\.node-gyp\\8.11.3\\<(target_arch)\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\James\\Desktop\\NodeRT-master\\src\\NodeRTUI\\bin\\Debug\\output\\windows.applicationmodel.store',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\James\\Desktop\\NodeRT-master\\src\\NodeRTUI\\bin\\Debug\\output\\windows.applicationmodel.store\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  _nodert_generated.cpp
  NodeRtUtils.cpp
  OpaqueWrapper.cpp
  CollectionsConverterUtils.cpp
  win_delay_load_hook.cc
..\NodeRtUtils.cpp(110): warning C4996: 'Nan::MakeCallback': was declared deprecated [C:\Users\James\Desktop\NodeRT-master\src\NodeRTUI\bin\Debug\output\windows.applicationmodel.store\build\bin
ding.vcxproj]
  C:\Users\James\Desktop\NodeRT-master\src\NodeRTUI\bin\Debug\output\windows.applicationmodel.store\node_modules\nan\nan.h(950): note: see declaration of 'Nan::MakeCallback'
..\NodeRtUtils.cpp(190): warning C4996: 'Nan::ForceSet': was declared deprecated [C:\Users\James\Desktop\NodeRT-master\src\NodeRTUI\bin\Debug\output\windows.applicationmodel.store\build\binding
.vcxproj]
  c:\users\james\desktop\nodert-master\src\nodertui\bin\debug\output\windows.applicationmodel.store\node_modules\nan\nan_maybe_43_inl.h(130): note: see declaration of 'Nan::ForceSet'
..\NodeRtUtils.cpp(269): warning C4996: 'Nan::ForceSet': was declared deprecated [C:\Users\James\Desktop\NodeRT-master\src\NodeRTUI\bin\Debug\output\windows.applicationmodel.store\build\binding
.vcxproj]
  c:\users\james\desktop\nodert-master\src\nodertui\bin\debug\output\windows.applicationmodel.store\node_modules\nan\nan_maybe_43_inl.h(130): note: see declaration of 'Nan::ForceSet'
..\NodeRtUtils.cpp(274): warning C4996: 'Nan::ForceSet': was declared deprecated [C:\Users\James\Desktop\NodeRT-master\src\NodeRTUI\bin\Debug\output\windows.applicationmodel.store\build\binding
.vcxproj]
  c:\users\james\desktop\nodert-master\src\nodertui\bin\debug\output\windows.applicationmodel.store\node_modules\nan\nan_maybe_43_inl.h(130): note: see declaration of 'Nan::ForceSet'
c:\users\james\desktop\nodert-master\src\nodertui\bin\debug\output\windows.applicationmodel.store\node-async.h(246): warning C4996: 'Nan::MakeCallback': was declared deprecated (compiling sourc
e file ..\_nodert_generated.cpp) [C:\Users\James\Desktop\NodeRT-master\src\NodeRTUI\bin\Debug\output\windows.applicationmodel.store\build\binding.vcxproj]
  C:\Users\James\Desktop\NodeRT-master\src\NodeRTUI\bin\Debug\output\windows.applicationmodel.store\node_modules\nan\nan.h(950): note: see declaration of 'Nan::MakeCallback' (compiling source f
  ile ..\_nodert_generated.cpp)
c:\users\james\desktop\nodert-master\src\nodertui\bin\debug\output\windows.applicationmodel.store\node-async.h(286): warning C4996: 'Nan::MakeCallback': was declared deprecated (compiling sourc
e file ..\_nodert_generated.cpp) [C:\Users\James\Desktop\NodeRT-master\src\NodeRTUI\bin\Debug\output\windows.applicationmodel.store\build\binding.vcxproj]
  C:\Users\James\Desktop\NodeRT-master\src\NodeRTUI\bin\Debug\output\windows.applicationmodel.store\node_modules\nan\nan.h(950): note: see declaration of 'Nan::MakeCallback' (compiling source f
  ile ..\_nodert_generated.cpp)
..\_nodert_generated.cpp(3348): error C2440: '=': cannot convert from 'Windows::Foundation::IAsyncOperation<Platform::String ^> ^' to 'Windows::Foundation::IAsyncOperation<Windows::ApplicationM
odel::Store::PurchaseResults ^> ^' [C:\Users\James\Desktop\NodeRT-master\src\NodeRTUI\bin\Debug\output\windows.applicationmodel.store\build\binding.vcxproj]
  ..\_nodert_generated.cpp(3348): note: No user-defined-conversion operator available, or
  ..\_nodert_generated.cpp(3348): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\_nodert_generated.cpp(4473): error C2440: '=': cannot convert from 'Windows::Foundation::IAsyncOperation<Platform::String ^> ^' to 'Windows::Foundation::IAsyncOperation<Windows::ApplicationM
odel::Store::PurchaseResults ^> ^' [C:\Users\James\Desktop\NodeRT-master\src\NodeRTUI\bin\Debug\output\windows.applicationmodel.store\build\binding.vcxproj]
  ..\_nodert_generated.cpp(4473): note: No user-defined-conversion operator available, or
  ..\_nodert_generated.cpp(4473): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
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:\Users\James\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\James\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--msvs_version=2015" "--dist-url=https://github.com/electron/electron/releases/download/v2.0.4/electron-v2.0.4-win32-x64.zip"
gyp ERR! cwd C:\Users\James\Desktop\NodeRT-master\src\NodeRTUI\bin\Debug\output\windows.applicationmodel.store
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

goldfire avatar Jul 19 '18 13:07 goldfire

@goldfire, I'm seeing the same error. I really want to get this working. I'm trying to verify receipts so I can work on new features. This thread sums up my issue.

For me, I'm trying to integrate into an Electron app with npm install @nodert-win10-rs3/windows.applicationmodel.store which runs node-gyp rebuild ... resulting in errors:

..\_nodert_generated.cpp(2933): error C2440: '=': cannot convert from 'Windows::Foundation::IAsyncOperation<Platform::String ^> ^' to 'Windows::Foundation::IAsyncOperation<Windows::ApplicationM
odel::Store::PurchaseResults ^> ^' [C:\Users\...\app\node_modules\@nodert-win10-rs3\windows.applicationmodel.store\build\binding.vcxproj]
  ..\_nodert_generated.cpp(2933): note: No user-defined-conversion operator available, or
  ..\_nodert_generated.cpp(2933): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

and...

..\_nodert_generated.cpp(3979): error C2440: '=': cannot convert from 'Windows::Foundation::IAsyncOperation<Platform::String ^> ^' to 'Windows::Foundation::IAsyncOperation<Windows::ApplicationM
odel::Store::PurchaseResults ^> ^' [C:\Users\...\app\node_modules\@nodert-win10-rs3\windows.applicationmodel.store\build\binding.vcxproj]
  ..\_nodert_generated.cpp(3979): note: No user-defined-conversion operator available, or
  ..\_nodert_generated.cpp(3979): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

I don't know exactly how to troubleshoot these errors, but if I had a guess, there's some kind of confusion that causes the translation to think CurrentApp.RequestProductPurchaseAsync Method (or a similar method) returns a string (XML).

Did you come up with any other solution?

semireg avatar May 11 '19 22:05 semireg

any news here? I ran in the same error when installing the app

brainexe avatar Mar 20 '20 12:03 brainexe

any news?

gaodeng avatar Oct 24 '20 00:10 gaodeng