Resource creation fails on log_config module when using AWS Linux

I have a client node on AWS running on AWS Linux (RHEL) that is showing the following error during httpd_service creation. This error does not occur when testing locally with test kitchen on a CentOS VM.
Stack Trace from AWS node
Recipe: cascade::apache2
  * httpd_service[cascade-apache2] action create
    * yum_package[cascade-apache2 :create httpd] action install (up to date)
    * service[cascade-apache2 :create httpd] action stop (up to date)
    * service[cascade-apache2 :create httpd] action disable (up to date)
    * yum_package[cascade-apache2 :create net-tools] action install (up to date)
    * httpd_module[cascade-apache2 :create log_config] action create
      * yum_package[cascade-apache2 :create log_config :create ] action install
        * No candidate version available for cascade-apache2 :create log_config :create
        ================================================================================
        Error executing action `install` on resource 'yum_package[cascade-apache2 :create log_config :create ]'
        ================================================================================

        Chef::Exceptions::Package
        -------------------------
        No candidate version available for cascade-apache2 :create log_config :create

        Resource Declaration:
        ---------------------
        # In /var/chef/cache/cookbooks/httpd/libraries/provider_httpd_module_rhel.rb

         21:         package "#{new_resource.name} :create #{parsed_module_package_name}" do
         22:           package_name parsed_module_package_name
         23:           action :install
         24:         end
         25:

        Compiled Resource:
        ------------------
        # Declared in /var/chef/cache/cookbooks/httpd/libraries/provider_httpd_module_rhel.rb:21:in `block in <class:HttpdModuleRhel>'

        yum_package("cascade-apache2 :create log_config :create ") do
          action [:install]
          retries 0
          retry_delay 2
          default_guard_interpreter :default
          package_name "cascade-apache2 :create log_config :create "
          flush_cache {:before=>false, :after=>false}
          declared_type :package
          cookbook_name "cascade"
        end

      ================================================================================
      Error executing action `create` on resource 'httpd_module[cascade-apache2 :create log_config]'
      ================================================================================

      Chef::Exceptions::Package
      -------------------------
      yum_package[cascade-apache2 :create log_config :create ] (/var/chef/cache/cookbooks/httpd/libraries/provider_httpd_module_rhel.rb line 21) had an error: Chef::Exceptions::Package: No candidate version available for cascade-apache2 :create log_config :create

      Resource Declaration:
      ---------------------
      # In /var/chef/cache/cookbooks/httpd/libraries/provider_httpd_service_rhel.rb

       45:             httpd_module "#{new_resource.name} :create #{m}" do
       46:               module_name m
       47:               httpd_version parsed_version
       48:               instance new_resource.instance
       49:               action :create
       50:             end
       51:           end

      Compiled Resource:
      ------------------
      # Declared in /var/chef/cache/cookbooks/httpd/libraries/provider_httpd_service_rhel.rb:45:in `block (2 levels) in <class:HttpdServiceRhel>'

      httpd_module("cascade-apache2 :create log_config") do
        action [:create]
        retries 0
        retry_delay 2
        default_guard_interpreter :default
        declared_type :httpd_module
        cookbook_name "cascade"
        instance "cascade-apache2"
        module_name "log_config"
      end

    ================================================================================
    Error executing action `create` on resource 'httpd_service[cascade-apache2]'
    ================================================================================

    Chef::Exceptions::Package
    -------------------------
    httpd_module[cascade-apache2 :create log_config] (/var/chef/cache/cookbooks/httpd/libraries/provider_httpd_service_rhel.rb line 45) had an error: Chef::Exceptions::Package: yum_package[cascade-apache2 :create log_config :create ] (/var/chef/cache/cookbooks/httpd/libraries/provider_httpd_module_rhel.rb line 21) had an error: Chef::Exceptions::Package: No candidate version available for cascade-apache2 :create log_config :create

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/cascade/recipes/apache2.rb

     42: httpd_service 'cascade-apache2' do
     43:   modules ['rewrite', 'ssl', 'proxy', 'proxy_ajp']
     44:   package_name 'httpd'
     45:   action [:create, :start]
     46: end
     47:

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/cascade/recipes/apache2.rb:42:in `from_file'

    httpd_service("cascade-apache2") do
      action [:create, :start]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      declared_type :httpd_service
      cookbook_name "cascade"
      recipe_name "apache2"
      modules ["rewrite", "ssl", "proxy", "proxy_ajp"]
      package_name "httpd"
      instance "cascade-apache2"
    end

Running handlers:
[2015-08-06T13:06:22-05:00] ERROR: Running exception handlers
Running handlers complete
[2015-08-06T13:06:22-05:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 13.709229297 seconds
[2015-08-06T13:06:22-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2015-08-06T13:06:22-05:00] ERROR: httpd_service[cascade-apache2] (cascade::apache2 line 42) had an error: Chef::Exceptions::Package: httpd_module[cascade-apache2 :create log_config] (/var/chef/cache/cookbooks/httpd/libraries/provider_httpd_service_rhel.rb line 45) had an error: Chef::Exceptions::Package: yum_package[cascade-apache2 :create log_config :create ] (/var/chef/cache/cookbooks/httpd/libraries/provider_httpd_module_rhel.rb line 21) had an error: Chef::Exceptions::Package: No candidate version available for cascade-apache2 :create log_config :create
[2015-08-06T13:06:23-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Stack Trace from Test Kitchen
Recipe: cascade::apache2
    * yum_package[cascade-apache2 :create httpd] action install (up to date)
 (up to date)
 (up to date)
 (up to date)

 (up to date)
 (up to date)
      * template[cascade-apache2 :create log_config :create /etc/httpd-cascade-apache2/conf.d/log_config.load] action create (up to date)
(up to date)

 (up to date)
 (up to date)
 (up to date)
(up to date)
 (up to date)
    * link[cascade-apache2 :create /usr/sbin/httpd-cascade-apache2.worker] action create (up to date)
    * link[cascade-apache2 :create /usr/sbin/httpd-cascade-apache2.event] action create (up to date)

      * directory[cascade-apache2 :create mpm_worker :create /etc/httpd-cascade-apache2/conf.d] action create (up to date)
 (up to date)
(up to date)
 (up to date)
 (up to date)
 (up to date)
 (up to date)
    * directory[cascade-apache2 :create /var/log/httpd-cascade-apache2] action create (up to date)
    * link[cascade-apache2 :create /etc/httpd-cascade-apache2/logs] action create (up to date)
    * link[cascade-apache2 :create /etc/httpd-cascade-apache2/modules] action create (up to date)
    * directory[cascade-apache2 :create /var/run/httpd-cascade-apache2] action create (up to date)
    * link[cascade-apache2 :create /etc/httpd-cascade-apache2/run] action create (up to date)
 (up to date)
 (up to date)

      * yum_package[cascade-apache2 :create rewrite :create httpd] action install (up to date)
 (up to date)
 (up to date)
(up to date)

 (up to date)
      * directory[cascade-apache2 :create ssl :create /etc/httpd-cascade-apache2/conf.d] action create (up to date)
 (up to date)
(up to date)

      * yum_package[cascade-apache2 :create proxy :create httpd] action install (up to date)
 (up to date)
 (up to date)
(up to date)

      * yum_package[cascade-apache2 :create proxy_ajp :create httpd] action install (up to date)
      * directory[cascade-apache2 :create proxy_ajp :create /etc/httpd-cascade-apache2/conf.d] action create (up to date)
 (up to date)
(up to date)
     (up to date)

 (up to date)
 (up to date)
 (up to date)
 (up to date)
     (up to date)

 (up to date)
 (up to date)
     (up to date)

Running handlers:
Running handlers complete
Chef Client finished, 0/78 resources updated in 9.334210483 seconds
Finished converging <default-centos-65> (0m12.81s).
-----> Kitchen is finished. (0m13.72s)

It appears that there is something wrong with the code itself if you could snippet or post that we could further troubleshoot.

I am no longer running into this issue, but do want to take this time to mention I am running into another issue with the latest Amazon Linux AMI. I reported this on #103 because the stack trace I was seeing is similar


Images generation performance issue

Right now we are using the django-versatileimagefield (VF) package for images thumbnails generation. Its default behavior is to generate images on demand. VF uses cache to determine which images need to be generated.
That behavior is dangerous on typical ecommerce products list. If page for instance has 20 images and 4 different sizes per resolution we end up with 80 request to the cache and in worst scenario 80 images start to be generated on machine which is handling responses.
In all previous projects we disabled auto generation. Because of that we had to write custom celery tasks (which generate images in the background) and custom template tag (@artursmet can provide more details). It will be nice to have this done by default.

Important note: VF only relies on cache when generating images on-demand. This is not the setup we want to encourage for production use.


InMemory... No database providers are configured. Configure a database provider by overriding OnConfiguring in your DbContext class or in the AddDbContext method when setting up services.

I am setting up unit tests so for the Entity Framework I use "EntityFramework.InMemory": "7.0.0-beta8".
Then the services in the test environment are:
services.AddEntityFramework()
.AddSqlServer()
.AddDbContext();
The StorageContext has the OnConfiguring which gets run successfully and does:
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseInMemoryDatabase();
}
However when I then get the StorageContext from the services (or any other way) it throws with the error:
Exception thrown: 'System.InvalidOperationException' in EntityFramework.Core.dll
Additional information: No database providers are configured. Configure a database provider by overriding OnConfiguring in your DbContext class or in the AddDbContext method when setting up services.
Yet it is configured as I called the UseInMemoryDatabase().
If I add optionsBuilder.UseSqlServer("connectionStringHere") instead of UseInMemoryDatabase() it works by using the actual database, so it seems its purely the UseInMemoryDatabase() with the issue.

Try calling AddInMemoryDatabase() after AddEntityFramework().
I think that should fix it, but the exception you got could have been more helpful.

Thanks that fixed it. Yes I think if the module could detect the missing AddEntityFramework and report a more helpful message that would help others that miss that bit out too.

Reopening to consider exception improvement.

@rowanmiller Reviewed the messages when we made updates to the D.I. behavior recently, so closing this.


[solved] Using Visual C++ Build Tools 2015 – standalone C++ tools

[EDIT]
Guide
1 Your OS MUST be Windows
2 Check that python is in your path by writting python --version in the console. If not then
2.1 Download python 2.7 (I recommend chocolatey (choco install python2 -y))
3. Are you on Windows 7? Then follow the rest of 3.x
3.1 Check that you have .NET 4.5.1+ installed. If not then
3.2 Download and install .NET 4.5.1 (.NET 4.5.2 will also work just fine)
4 Download Microsoft Visual C++ Build Tools 2015 Technical Preview
4.1 Install the Windows 8.1 SDK if you haven't already. Note; I recently updated to Windows 10 and had to install the Windows 10 SDK before node-gyp would successfully build.
5 Set the npm config variable msvs_version to 2015: npm config -g set msvs_version 2015
6 Do npm i in what-ever project with node-gyp as a dependency without seeing weird error messages :+1:
Tested with node 5.0.0+ and npm 3.3.6
thanks to @mousetraps
I happily noticed that MS provides a standalone c++ compiler. I will try to use it with node-gyp (via utf-8-validate) and report my findings here.
http://blogs.msdn.com/b/vcblog/archive/2015/11/02/announcing-visual-c-build-tools-2015-standalone-c-tools-for-build-environments.aspx

Adding C:\Program Files (x86)\MSBuild\14.0\Bin to my PATH yields no result. Still getting:
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location o f the component to the system path if it is installed elsewhere.   System Windows_NT 6.1.7601
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 C:\Users\dotnet\Projects\firefund-cli\node_modules\utf-8-validate
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:utf-8-validate<EMAIL_ADDRESS>install: `node-gyp rebuild`
npm WARN install:utf-8-validate Exit status 1

Need to tell node-gyp to use MSBuild.exe

@dotnetCarpenter hey, thanks for trying it out! Did you end up getting it working? Is there anything missing from these steps? https://github.com/nodejs/node-gyp/issues/629#issuecomment-153196245

thx @mousetraps. Unfortunately I'm not sure how to tell node-gyp to use MSBuild.exe.
You comment prompted me to try just compiling a project via npm install.
I've set npm config set msvs_version 2015 --global but didn't set python as python --version already gives me  2.7.10.
I saw that you successfully compiled utf-8-validate so I cloned that repo and did npm i. The result was not very encouraging:
c:\users\dotnet\.node-gyp\5.0.0\include\node\uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory [C:\Users\dotnet\Projects\playground\utf-8-validate\b uild\validation.vcxproj]
Got .Net 4.5.2 : Release DWORD 5cbf5 (379893)
Entire output:
><EMAIL_ADDRESS>install C:\Users\dotnet\Projects\playground\utf-8-validate
> node-gyp rebuild

C:\Users\dotnet\Projects\playground\utf-8-validate {git}
{lamb} 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 )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.  TargetFrameworkVersion or Platfo rmToolset may be set to an invalid version number. [C:\Users\dotnet\Projects\playground\utf-8-validate\build\validation.vcxproj]
  validation.cc
c:\users\dotnet\.node-gyp\5.0.0\include\node\uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory [C:\Users\dotnet\Projects\playground\utf-8-validate\b uild\validation.vcxproj]
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:270: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 6.1.7601
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 C:\Users\dotnet\Projects\playground\utf-8-validate
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i"
npm ERR! node v5.0.0
npm ERR! npm  v3.3.6
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the utf-8-validate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls utf-8-validate
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\dotnet\Projects\playground\utf-8-validate\npm-debug.log

Did you install the Windows sdk too when installing the build tools (this should be the default)? I believe that's where winsock2.h comes from.

I get a similar errors when building ws.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.  TargetFrameworkVersion or Platfo rmToolset may be set to an invalid version number. [C:\Users\dotnet\Projects\playground\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
  bufferutil.cc
c:\users\dotnet\.node-gyp\5.0.0\include\node\uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory [C:\Users\dotnet\Projects\playground\ws\node_modules\ bufferutil\build\bufferutil.vcxproj]
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:270:23)

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.  TargetFrameworkVersion or Platfo rmToolset may be set to an invalid version number. [C:\Users\dotnet\Projects\playground\ws\node_modules\utf-8-validate\build\validation.vcxproj]
  validation.cc
c:\users\dotnet\.node-gyp\5.0.0\include\node\uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory [C:\Users\dotnet\Projects\playground\ws\node_modules\ utf-8-validate\build\validation.vcxproj]
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:270:23)

@dotnetcarpenter Even after installing the Windows sdk?

Should I install the Windows 8.1 SDK with the Build Tools installer or the Windows 7 SDK when I'm on Windows 7?
Unfortunately I can not update to Windows 10 due to an unknown installation error when upgrading.

Hmm.. I somehow thought I could get things compiling without a Windows SDK but in the end I installed Windows 8.1 SDK via the installer and things seems to be working. :tada:

@dotnetCarpenter
Hi. Installed the Build Tools 2015 provided by @mousetraps, followed instructions, tried to install selenium-webdriver (node-gyp dependant) and got the error below. Any ideas? (nodejs 4.2.2, npm 3.4, windows 10x64)
Thank you!
C:\Users\rickm\AppData\Roaming\npm\node_modules\selenium-webdriver\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Users\rickm\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not fi
nd WindowsSDKDir variable from the registry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid versio
n number. [C:\Users\rickm\AppData\Roaming\npm\node_modules\selenium-webdriver\node_modules\utf-8-validate\build\validat
ion.vcxproj]
validation.cc
c:\users\rickm.node-gyp\4.2.2\include\node\uv-win.h(32): fatal error C1083: Cannot open include file: 'winsock2.h': No
such file or directory [C:\Users\rickm\AppData\Roaming\npm\node_modules\selenium-webdriver\node_modules\utf-8-validate
\build\validation.vcxproj]
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\rickm\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:270: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.10240
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\rickm\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\rickm\AppData\Roaming\npm\node_modules\selenium-webdriver\node_modules\utf-8-validate
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN<EMAIL_ADDRESS><EMAIL_ADDRESS>install: node-gyp rebuild
npm WARN<EMAIL_ADDRESS>Exit status 1

warning MSB8003: Could not find WindowsSDKDir variable from the registry.

Looks like you're missing the Windows 10 SDK, since you are on Windows 10. I think you can uninstall Windows SDK 8.1. Let me know if it works and I'll update the guide to be more clear.
Also, be sure to:
3.1 Check that you have .NET 4.5.1+ installed. If not then
3.2 Download and install .NET 4.5.1 (.NET 4.5.2 will also work just fine)

I have installed the windows 10 SDKs but somehow I think it failed to add it to the registry (or something like that), but I don't know how to fix it...

Run the VisualCppBuildTools_Full.exe that you downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=49512 and choose Repair.

@dotnetCarpenter I finally got it working checking BOTH windows 10 SDKs and windows 8 SDK (I'm on win10) when installing the 2015 build tools. It seems that somehow the windows 10 SDKs is built on top of the windows 8 SDKs OR the windows 10 SDKs package has a bug that fails to add the correspondent registry values, and my system is simple using the windows 8 SDKs (when I added it later).

sounds weird. perhaps @mousetraps has an idea to why.

@dotnetCarpenter - I followed your Guide above with a clean install of Windows 10. The only correction I would make is that, while the Windows 8.1 SDK must be installed, the Windows 10 SDK is completely unnecessary (at least for the purpose of this issue).

@LittleBrainz thanks. I will update the guide.
@mousetraps I noticed that the link to Microsoft Visual C++ Build Tools 2015 Technical Preview doesn't work anymore. Is the correct link now Microsoft Build Tools 2015 ?

@mousetraps I can't find the link to Microsoft Visual C++ Build Tools 2015. It seems that you're out of Technical Preview but there is no updates on the C++ blog

Link was fixed on the C++ blog:
Download Visual C++ Build Tools 2015

@HoriLiu thanks! updated

Apparently, it doesn't matter what OS you're on. You just need the Windows 8.1 SDK.

@mousetraps I suspect that the Windows SDK  prerequisite, is node add-on dependent. So if add-on A uses some feature of Windows 10 SDK, then we must install the Windows 10 SDK, correct?

I haven't submitted this yet because I need to confirm something w/ the cpp team (and also update the link), but my branch currently has a PR w/ minimal required steps.
https://github.com/nodejs/node-gyp/compare/master...mousetraps:i629
You do NOT need to check the Windows SDK boxes - as explained in https://github.com/nodejs/node-gyp/issues/629#issuecomment-159808154, if you use the default install a minimal set of dependencies from both the Windows 8.1 and Windows 10 SDK will be installed. We're still working out a few kinks w/ custom install, though.

What confused me about the installation steps is actually from the c++ blog images, where Windows 8.1 SDK is ticked and your initial comment was not specific about the SDKs. I honestly don't remember if I choose the default installation the first time around but I will try later and update the guide if it works.

Well ticking the sdk box should work fine too... and it actually works fine on my machine and several VM configs I've tested (haven't been able to reproduce the other issues ppl are running into yet), but unfortunately we can't ship my machine - partly because it wouldn't scale, and partly because it got stolen today... :disappointed:
In any case, that's the reason we call it "preview" :smiley:, so we appreciate the feedback and hopefully we can work this feedback into the RTM release.

I've been trying to get my Windows development environment set up for a while now and nothing I try seems to be working.
Steps I took:

Installed<EMAIL_ADDRESS>(x86).

$ node -v
v4.2.3

Updated to<EMAIL_ADDRESS>
$ npm -v
3.2.2

Installed<EMAIL_ADDRESS>(x86)

$ python --version
Python 2.7.10

Installed .NET Framework 4.5.1 from here
Installed VC++ Build Tools 2015 from here with the default options
Ran required npm configurations

$ npm config set python python2.7
$ npm config set msvs_version 2015 --global
```
Results:

$ npm install bufferutil

<EMAIL_ADDRESS>install C:\Users\mp86743\Documents\Dev\test\node_modules\bufferutil
node-gyp rebuild

C:\Users\mp86743\Documents\Dev\test\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Users\mp86743\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
gyp: C:\Users\mp86743.node-gyp\4.2.3\common.gypi not found (cwd: C:\Users\mp86743\Documents\Dev\test\node_modules\bufferutil) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\mp86743\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:357:16)
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 6.1.7601
gyp ERR! command "C:\bench\nodejs\4.2.3\node.exe" "C:\Users\mp86743\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\mp86743\Documents\Dev\test\node_modules\bufferutil
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm WARN EPACKAGEJSON<EMAIL_ADDRESS>No description
npm WARN EPACKAGEJSON<EMAIL_ADDRESS>No repository field.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\bench\nodejs\4.2.3\node.exe" "C:\Users\mp86743\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "bufferutil"
npm ERR! node v4.2.3
npm ERR! npm  v3.2.2
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the bufferutil package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls bufferutil
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\mp86743\Documents\Dev\test\npm-debug.log
Anyone have any ideas?

I'm pretty sure that you need to install Windows 8.1 SDK. I think I had the same issue as you. According to @mousetraps the installer is trying to be smart and only install the bare minimum. But it seems that no one has gotten it to work without the Windows 8.1 SDK. Note that no one here have had to install the Windows 10 SDK...

Hi @dotnetCarpenter, thanks for the quick response.  I thought that the Windows 8.1 SDK was included with the VC++ Build Tools, which is why I did not install it earlier.
In any case, I installed it from here, and it finished almost instantly, which leads me to believe that I already had it installed.  I attempted an npm install bufferutil again with the same results as before.

gyp: C:\Users\mp86743.node-gyp\4.2.3\common.gypi

@Mrparkers Try deleting the .node-gyp directory, then run npm install again.

@bnoordhuis After doing that, I started getting a different error: 404 status code downloading 32-bit node.lib.  I went to this issue thread to see if I could fix that one, which advised me to run npm install node-gyp@latest from C:\Users\mp86743\AppData\Roaming\npm\node_modules\npm, and now I'm running into a different error: Cannot open include file: 'stddef.h', which brought me back to this issue thread, which is the thread that brought me here.
I feel like I'm taking one step forward and two steps back with every attempt at solving my problem :cry:

The stddef.h error means you're moving in the right direction.  You probably need to install VS (see the node-gyp README for details) and run vcvarsall.bat to configure the environment.

Or follow this guide. You don't need VS. I got the same error - see comment 155888553 in this thread. I had to install the Windows 8.1 SDK from Microsoft Visual C++ Build Tools 2015 Technical Preview here http://www.microsoft.com/en-us/download/details.aspx?id=49983. I think you should uninstall your previously installed SDK and install the one that comes with Build Tools 2015. You might want to uninstall other things as well. But since Win8.1 SDK is a big download (around 4GB if I remember correctly), you might opt for just installing VS as @bnoordhuis suggest.

I installed VS 2013 Ultimate, executed VC/vcvarsall.bat, and ran npm config -g set msvs_version 2013 --global.  Everything seems to be working now.
Thanks for the help @bnoordhuis and @dotnetCarpenter

I followed the guide and can't get it to work. It must be some nuance. I now installed Visual Studio 2013 Express and this worked for me.

@sponiro It depends what you had installed before. The guide should work in a "clean" environment. Microsoft Visual C++ Build Tools 2015 Technical Preview  is in Technical Preview because not all kinks have been worked out. We need your bug reports before Microsoft Visual C++ Build Tools 2015 and this or another guide can be made a part of the node-gyp README.

Hello,
I have been struggling with this in a major way in the past few days (I'm lucky, it looks like it's been way longer than that for some people!). Using Windows 10, node v4.2.1, npm v3.5.2, Python v2.7.11. I keep getting an error message after doing 'npm install' (stddef.h: no such file or directory). That's after installing VS 2015 and the 8.1 SDK (in that order). I have found that file and it's apparently in the SDK 10 folder (../windows kits/10/include/10.0.10150.0/ucrt). I guess the npm installer does not know to look in the right place for this file? Maybe the SDK 10 was not registered correctly?
To try to resolve this I went back to my VS 2015 installer and tried to do "modify". I was presented with two check boxes, one for each SDK (8.1 and 10).
This confused me a bit (I'm very new to all of this so that's easy!) because I don't remember installing 10; so it came with the VS I guess? Do both SDKs come with the VS? Also, I'm not sure what checking these boxes actually mean. Update the install?
Anyway, I haven't been able yet to do this, I hope it solves it. :-(
One last question: I've seen people above say 'executed  VC/vcvarsall.bat'. Where is that bat file typically located? Is it a mandatory step? It'd come between steps 4 and 5 of the above guide? How come it's not in there?
This thread has been really useful, thanks!

About the VC/vcvarsall.bat: when I try to do that (and basically whenever I try to open any VS 2015 command prompt window) I get an error message: "ERROR: cannot determine the location of the VS common tools folder". Does someone know of a fix? Thanks.

Everyone: In https://github.com/sass/node-sass/issues/1283 we figured out that binaries we compile with VS2015 do not work on Windows XP.
One has to be aware that node itself is built using VS2013 and therefore it is using version 12 of Microsoft build tools (something like PlatformToolset set to v120).
We will experiment with various values of PlatformToolset but definitely if one expects 100% compatibility with existing node engines I'd go for VS2013 now.

@saper,

Visual Studio 2010 => v100
Visual Studio 2012 => v110
Visual Studio 2013 => v120
Visual Studio 2015 => v140

VS2013 is shipped with these toolsets: v110, v120, v110_xp and v120_xp.
And VS2015 with: v120, v140, v120_xp and v140_xp.
So if you are building any C/C++ project with VS2015, you need to set PlatformToolset to v140_xp for Windows XP support. Similarly, if you are building C/C++ project with VS2013, you need to set PlatformToolset to v120_xp.
This is because Windows XP support was made optional since VS2012 (they statically compile more stuff with XP-supported binary; binary size grows). It was VS2010 which used to support Windows XP without changing the PlatformToolset.
Hope this information will remedy your confusion.
Now, like I said there, node-sass binary will be compatible if msbuild_toolset in .gypi file is set to v140_xp. Better if we figure out a way to set msbuild_toolset in .gyp file instead.

It is my understanding that release binaries of node are built with PlatformToolset set to vs120. Unfortunately, this information is not exported in the common.gypi file. I think this is the main problem here.
On the other note, the node-sass binding file for node 5.3.0 (win32; 32-bit) compiled with VS2013 has 1272832 bytes and VS2015 produced 1356546.

If you compare the binary size build with v120 and v120_xp OR v140 and v140_xp, there must be a difference according to MSDN.

1272832 is what I believe is v120 (VS2013 default) vs. 1356546 from vs140 (what we are using to build the binaries). Actually there might be no need to use _xp versions it seems.

Well, the binary size comparison I referred was supposed to be between xp and non-xp variants of same versions of VS, and not the different versions of VS.
VS2015 has some new linker flags. For example, setting /LTCG:incremental linker flag combined with compiler flag /Ogs or /Ox provides space optimization. More on MSDN.
The toolset can be set in common.gypi like others have mentioned here: https://github.com/nodejs/node-gyp/issues/339#issuecomment-61215713 (replace v120_xp with v140_xp for VS2015).

@ogandou If you are installing VIsual Studio 2015 and not Microsoft Visual C++ Build Tools 2015 Technical Preview then this guide is not for you. This guide is intended for people who do not wish to install an entire IDE just to compile nodejs modules.

Question: do Microsoft Visual C++ Build Tools 2015  include support for PlatformToolset v120 and/or 12.0 tools?

Hi guys,
I'm having these troubles too. i have followed the instructions here with a clean Win7 install, and i still get errors.
@dotnetCarpenter  @mousetraps , Can you help?
C:\Users\YONI\.node-gyp\4.2.6\include\node\v8.h(18): fatal error C1083: Cannot
open include file: 'stddef.h': No such file or directory [D:\Dev\getinvolved\cl
ient\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\no
de_modules\ws\build\validation.vcxproj]

On Mon, 25 Jan 2016, Yoni Dor wrote:

Hi guys,
I'm having these troubles too. i have followed the instructions here with a clean Win7 install, and i still get errors.
@dotnetCarpenter  @mousetraps , Can you help?

Do you have Windows SDK installed?

@saper, I have done everything as mentioned in the first post of this thread. I have installed Windows SDK 8.1 from Microsoft Visual C++ Build Tools 2015 Technical Preview installation. Should i try to reinstall?

@yonidor can you post the result of npm config -g list here, your Windows version and the name of the node package you are trying to compile?

@dotnetCarpenter Sure,
npm config -g list output:
; cli configs
global = true
user-agent = "npm/2.14.12 node/v4.2.6 win32 x64"

; globalconfig C:\Users\YONI\AppData\Roaming\npm\etc\npmrc
msvs_version = "2015"

; builtin config undefined
prefix = "C:\\Users\\YONI\\AppData\\Roaming\\npm"

; node bin location = C:\Program Files\nodejs\node.exe
; cwd = D:\Dev\Angular2\GetInvolved
; HOME = C:\Users\YONI
; 'npm config ls -l' to show all defaults.

Windows version is Windows Professional 7 SP1 64bit
the node packages that fail are<EMAIL_ADDRESS>and<EMAIL_ADDRESS>

@dotnetCarpenter , No idea for me? :(

Sorry, I had a coffee accident with my laptop. The output looks right.
Does D:\Dev\getinvolved\cl ient\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\no de_modules\ws\build\validation.vcxproj exist? If not, you probably had a bad npm download.
If yes, find the reference to stddef.h in validation.vcxproj. Does it exist? If not, you probably had a bad npm download.
Try deleting the node_modules folder and npm i again. If it doesn't work, check out the socket.o-client github project and see if the file is in the repository at all. If not, then create a github issue.

had to update from npm 3.3.6 to npm 3.6.0 to make it work

Hmm.. I got it to work with npm  3.3.6 but it's true that the package itself could use a feature from  newer npm version, hence you need npm 3.6.0+

Hi ,
did like mentioned above, installed windows 8.1 skd (compiler came with vs 2015  installation, BTW only done because of nw-gyp errors ), set the studio version, now the error was about missing header files (stddef.h etc) , looking it up i realized that they only resided in windowsKits\10\include, tried to copy them and got lots of typecast errors , so are there other header files vor the 8.1 sdk ( read on the ms-page that they redisigned the whole system with VS 2015 ), and if where do i get them from ???

OK now definitely found out that Windows 10 headers wont work :+1: https://naughter.wordpress.com/2015/05/15/changes-in-the-windows-10-sdk-compared-to-windows-8-1-part-one/
but i cant find a download for the corresponding 8.1 files, do i really have to do a manual install of VS2013 ( on a virtual machine probably ) or is there any chance of getting just the missing header files ???
Would be super if anybody out there could just mail them to me.

@treh1966 What npm module are you trying to compile? Seems they have an unordinary build step.

Tried to compile node-escpos.
Seems like i could only do it the automatic way, because even when i download the project manually from github, there is e.g. no binding.gyp file.

Tried to compile node-escpos.
Seems like i could only do it the automatic way, because even when i
download the project manually from github, there is e.g. no binding.gyp
file.
Am 07.02.2016 um 13:03 schrieb Jon Ege Ronnenberg:

@treh1966 https://github.com/treh1966 What npm module are you trying
to compile? Seems they have an unordinary build step.
—
Reply to this email directly or view it on GitHub
https://github.com/nodejs/node-gyp/issues/802#issuecomment-181000576.

@treh1966 there is at least 3 different node-escpos packages in the wild. Which one is it? Links please

Have to admit i am a little bit confused, as i also found several packages with escpos e.g. on github, which all claim to be installed by npm install node-escpos, so finally i dont know which one npm chooses.
the one i tried to download was the one from https://github.com/StadiumRunner/node-escpos, while the one listed in npm search seems to be https://github.com/song940/node-escpos
descriptions dond really give any hints on differences .

just found out, with npm view node-escpos that tthats something totally different again:
https://github.com/zinfo-ca/node-escpos
which dates back to 2013 and doesnt seem to be very useful, so how do i npm e.g. the Stadium runner one

OK, now when (which i just found out to be possible ) when trying to install from  the dl directory it seemed to work
I:\Registrierkassen\xmltests>npm install I:\Registrierkassen\apptest\Downloads\n
ode-escpos-masterStadiumRunner\node-escpos-master
npm WARN package.json<EMAIL_ADDRESS>No repository field.
npm WARN package.json<EMAIL_ADDRESS>No README data
npm WARN package.json<EMAIL_ADDRESS>No license field.

<EMAIL_ADDRESS>install I:\Registrierkassen\xmltests\node_modules\node-escpos\node_m
odules\usb
node-pre-gyp install --fallback-to-build

[usb] Success: "I:\Registrierkassen\xmltests\node_modules\node-escpos\node_modul
es\usb\src\binding\usb_bindings.node" is installed via remote
<EMAIL_ADDRESS>node_modules\node-escpos
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>└──<EMAIL_ADDRESS><EMAIL_ADDRESS>will immideately try using it , and report back if wanted

@dotnetCarpenter
Please help
Ok this tome i gave node-printer (http://github.com/tojocky/node-printer) a try
and succeded ??? in compiling , but still get no Release Folder or .node file
and require('printer') crashes.
BTW i simply copied the whole master folder to my node_modules folder, or is there any other procedure to follow ?
I:\Registrierkassen\apptest\Downloads\node-printer-tojockey\node-printer-master>
nw-gyp build
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| win32 | x64
(node) child_process: options.customFds option is deprecated. Use options.stdio
instead.
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' ]
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parall
ele Erstellung zu ermöglichen, müssen Sie den Schalter "/m" hinzufügen.
gyp info ok
I:\Registrierkassen\apptest\Downloads\node-printer-tojockey\node-printer-master>

@treh1966 You should install from the github repo. npm accepts git urls.

a < git remote url > that resolves to a folder containing a program described by a package.son file
https://docs.npmjs.com/cli/install

npm install --save https://github.com/tojocky/node-printer.git. But in this case, the package is in npm as printer - so just do npm i printer --save to save the package as a dependency in your package.json.
I'm not currently on Windows, so can not test, but your compiling effort looks successful.

gyp info it worked if it ends with ok
...
gyp info ok

@dotnetCarpenter
that didnt work either, getting lots og errors ( onvarious local directories and the url like:
...
npm ERR! git clone --template=D:\Benutzer\Administrator\AppData\Roaming\npm-cach
e_git-remotes_templates --mirror https://github.com/tojocky/node-printer.git D
:\Benutzer\Administrator\AppData\Roaming\npm-cache_git-remotes\git-https-github
-com-tojocky-node-printer-git-9b5ed545: undefined
npm ERR! git clone --template=D:\Benutzer\Administrator\AppData\Roaming\npm-cach
e_git-remotes_templates --mirror https://github.com/tojocky/node-printer.git D
:\Benutzer\Administrator\AppData\Roaming\npm-cache_git-remotes\git-https-github
-com-tojocky-node-printer-git-9b5ed545: undefined
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "D:\Benutzer\Administrator
\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "--save"
"https://github.com/tojocky/node-printer.git"
npm ERR! node v4.2.6
npm ERR! npm  v3.7.1
npm ERR! code ENOGIT
npm ERR! not found: git
....
So what i did is download the whole master branch to a local directory and point npm to that directory.
Now no matter which version of msvs i specify ( which worked great with nw-gyp) i get the missing header files errors ( stddef.h etc )
Do i have to have a clean npm install of the original to do a nw-gyp rebuild ??
BTW i found a precompiles windows version, but dont know, and found no clues how to use the directory structure, which contains the .node files ?
Thanks in advance
Thomas

@treh1966 You don't have git installed.

npm ERR! not found: git
You probably need git to install from a local git repository.

What happens when you do a standard install? npm install printer
I can see on the appveyor.com build log that node-printer compiles successfully with MSBuild 12.0, which I'm pretty sure comes with Visual Studio 2013.
Please check your PATH and that node-printer compiles with Visual Studio 2015.

2 Check that python is in your path by writting python --version in the console.

Thanks @dotnetCarpenter and @mousetraps !! Installing the missing Windows 8.1 SDK did make it work.

Installed both Windows 8.1 SDK and win 10 SDK... followed all the instructions and still not working
Hadi@ThinkPad MINGW64 ~/Desktop/New folder/utf-8-validate (master)
$ npm i
npm WARN deprecated<EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher                            to avoid a RegExp DoS issue
npm WARN deprecated<EMAIL_ADDRESS>Jade has been renamed to pug, please install th                           e latest version of pug instead of jade
npm WARN deprecated<EMAIL_ADDRESS>to-iso-string has been deprecated, use                            @segment/to-iso-string instead.
npm WARN deprecated<EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher                            to avoid a RegExp DoS issue

><EMAIL_ADDRESS>install C:\Users\Hadi\Desktop\New folder\utf-8-validate
> node-gyp rebuild

C:\Users\Hadi\Desktop\New folder\utf-8-validate>if not defined npm_config_node_g                           yp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_                           modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build,                            please add the "/m" switch.
  validation.cc
  win_delay_load_hook.c
C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_loa                           d_hook.c(34): error C2373: '__pfnDliNotifyHook2': redefinition; different type m                           odifiers [C:\Users\Hadi\Desktop\New folder\utf-8-validate\build\validation.vcxpr                           oj]
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134)                           : note: see declaration of '__pfnDliNotifyHook2'
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` fail                           ed 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:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_proces                           s.js:204:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej                           s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Hadi\Desktop\New folder\utf-8-validate
gyp ERR! node -v v6.3.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\                           node_modules\\npm\\bin\\npm-cli.js" "i"
npm ERR! node v6.3.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the utf-8-validate packag                           e,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs utf-8-validate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls utf-8-validate
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Hadi\Desktop\New folder\utf-8-validate\npm-debug.log

@Almusamim you're running in to our __pfnDliNotifyHook2 problem which has been covered pretty extensively on this issue tracker (not that I'm suggesting it's easy to identify!). In order to use the latest release of Visual Studio 2015 you need to get the latest version of node-gyp which comes with the latest v2 and v3 releases of npm. You should be able to run npm i npm@latest -g to get the latest version. Our next v6 release of Node.js should come with this too.

@ dotnetCarpenter
I am new to node js. I am running into the node-gyp errors this article described. My OS is Win8.1 and I have followed all the instructions but Step6/ in your guide at the beginning.
Can you explain what do you mean by "Do npm i in what-ever project with node-gyp as a dependency without seeing weird error messages"?
For example, currently, after I have performed your step 1-5, I used this command, "npm install -g TheApp". How do I incorporate your step 6 into this install command?
BTW, I have errors related to kerberos when I used the above generic install command which then led to the same node-gyp errors shown in this article.
Also, I did not install node-gyp separately, the app I tried to install w/o success seemed to install this module.
When I look at the user/appdata/roaming folder, node-gyp is created in a separate .node-gyp folder and not within the subfolder of npm/modules folders inside roaming. Is that (strange location of .node-gyp folder) normal?
Should I install node-gyp module (globally) to eradicate these errors?
Please advise.
Thanks in advance,
Sorcerer

One of the dumbest things we've tried to solve. Download, install, uninstall, reinstall, fresh install of windows.. yet, it works on one Windows 10 box and no others with identical builds. Dumb. giving up completely on node.js and node-gyp. Banned from my team forever.

Step 6 means everything is done and there should be no errors. If you are getting something else I'd file another bug. Kerberos errors suggest you might need proxy authentication to download stuff, I think this is out of scope of node-gyp

Thank you all for paticipating the discussion and share your insights.
I also met the problem while installing a native node module, and eventually, just solved it by installing Visual C++ Build Tool from npm-gyp official documents (Microsoft's Node.js Guidelines for Windows, by which installed Windows 8.1 SDK (althought I'm using Windows 10, an error message indicated the missing of 8.1 SDK ), .NET Framework SDK. I also installed the other two, but I'm not sure if they were neccessary, which are Windows 10 SDK and ATL/MFC SDK.
With other issues like Python version and PATH settings addressed, npm started to work normally.

Just like WillingAC, I also followed the official document from Microsoft's Node.js Guidelines for Windows, but I am still having problems when I tried to compile the Couchbase SDK for node (couchnode). The errors I ran into are:
uv-plugin-all.obj : error LNK2001: unresolved external symbol __imp_WSAGetLastError [D:\Development\NodeJs\couchbase-te st\node_modules\couchbase\build\couchbase_impl.vcxproj] uv-plugin-all.obj : error LNK2001: unresolved external symbol __imp_getsockopt [D:\Development\NodeJs\couchbase-test\no de_modules\couchbase\build\couchbase_impl.vcxproj] uv-plugin-all.obj : error LNK2001: unresolved external symbol __imp_recv [D:\Development\NodeJs\couchbase-test\node_mod ules\couchbase\build\couchbase_impl.vcxproj] D:\Development\NodeJs\couchbase-test\node_modules\couchbase\build\Release\couchbase_impl.node : fatal error LNK1120: 3 unresolved externals [D:\Development\NodeJs\couchbase-test\node_modules\couchbase\build\couchbase_impl.vcxproj]
After some Google searches, I found that I needed to link to WS2_32.Lib. I checked the SDK folder under C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86 (and x64) and the file is there. So, somehow npm-gyp just couldn't pass the location to msbuild. I also tried setting an environment variable ILink_LibraryPath and pointed it to WS2_32.Lib before compiling the module, but it didn't help. I am at lost!

@toyssamurai You should report that to the maintainers of the couchbase module, it's not a node-gyp issue.  Make sure you're using the latest version, it might have been fixed already.

I tired to find the MS standalone compiler, but when I opened the link it says the account expired. Is there any other link to download MS C++ standalone compiler.

The main advantage here is you don’t need the Git client, the disadvantage is that when changes are made to the project you have no way to download only those files which have been updated and must instead redownload the code in its entirety. Assignment help

In VS2017 & VS2019 MS did not release a stand alone compiler. There is a CLI only "Built Tools" SKU at - https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16

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\bhara\AppData\Roaming\nvm\v8.12.0\node_modules\npm\node_modules\node-gyp\lib\build.js:262: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.19042
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:\boilerplate\node_modules\zerorpc\node_modules\zeromq
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
error Command failed with exit code 1.
                command='C:\Program Files\nodejs\node.exe' 'C:\Users\bhara\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js' run install
                workingDir=D:\boilerplate\node_modules\zerorpc\node_modules\zeromq

error Command failed with exit code 1.
Anyone have any idea how to resolve this ?

@bharathrajitagi The text at https://github.com/nodejs/node-gyp/issues/new has the answers.


In SQL-to-REST API limit and offset do work only when used together

In SQL-to-REST API the get parameters limit and offset do work only when used together.
http://<IP_ADDRESS>:3042/movies
[{"id":1,"name":"The Wizard of Oz"},{"id":2,"name":"Jaws"},{"id":3,"name":"Star Wars"},{"id":4,"name":"A Streetcar Named Desire"}]

http://<IP_ADDRESS>:3042/movies?limit=1&offset=2
[{"id":3,"name":"Star Wars"}]

The get parameter limit does not work when used alone:
http://<IP_ADDRESS>:3042/movies?limit=1
[{"id":1,"name":"The Wizard of Oz"},{"id":2,"name":"Jaws"},{"id":3,"name":"Star Wars"},{"id":4,"name":"A Streetcar Named Desire"}]

The get parameter offset does not work when used alone:
http://<IP_ADDRESS>:3042/movies?offset=1
[{"id":1,"name":"The Wizard of Oz"},{"id":2,"name":"Jaws"},{"id":3,"name":"Star Wars"},{"id":4,"name":"A Streetcar Named Desire"}]

Also, limit and offset support is not reported in the SQL to REST API documentation.

https://github.com/platformatic/platformatic/pull/66


link to projects

We should link to existing projects adopting the ideas in this document.

https://github.com/iRail/OTDManifest/blob/09b06643fb096c1e342c5aee962623a733a24437/infographic_overview.png


Animation

How would I animate a series of images?
I would like to animate a series of images and record them. I have 3D matrix (shot[n,m,z])
z is the frame number. At each frame, I want to plot shot[n,m].

In the gallery, you can select the record tag button, to filter for all examples recording frames:
https://simondanisch.github.io/ReferenceImages/gallery/index.html
This gallery is also integrated into the new lastest docs : http://juliaplots.org/MakieGallery.jl/stable/


Make favicon retina display resolution

Tiny request: can we make our favicon hi-res enough to look good on a retina display? Here's what it currently looks like:

Icon looks good on my retina display.


Doc/ update user-guide => Terraform - S3 & DynamoDB for Remote State Storage & Locking section

What?
Update tf-backend initialization with --skip-validation where needed.

https://leverage.binbash.com.ar/first-steps/management-account/#terraform-backend-layer
https://leverage.binbash.com.ar/first-steps/security-and-shared-accounts/#terraform-backend-layer
https://leverage.binbash.com.ar/user-guide/ref-architecture-aws/tf-state-workflow/
https://leverage.binbash.com.ar/user-guide/ref-architecture-aws/tf-state-workflow/#set-up

Run leverage terraform init --skip-validation

Why?

Cover this specific case to let the user know that they'll need to pass the flag in this scenario.

@juanmatias let's consider the possibility to create another issue to cover:

https://github.com/gruntwork-io/git-xargs

https://github.com/marketplace/actions/enforce-pr-labels

As per the chat with @angelofenoglio and @rodriguez-matias it is a good idea to add a note when using the skip-validation flag explaining why this is needed.


unit tests for default parameters

So we can incorporate your pull request, please share the following:

What issue are you addressing with this pull request? https://project.marklogic.com/jira/browse/JAVA-60, https://project.marklogic.com/jira/browse/JAVA-61
Are you modifying the correct branch? develop
Have you run unit tests? yes
Version of MarkLogic Java Client API (see Readme.txt)
Version of MarkLogic Server (see admin gui on port 8001)
Java version (java -version)
OS and version
What Changed: What happened before this change? What happens without this change?

Also adding javadoc for withDefaultArgs.


Add subscription operation support

Adds subscription operation support that landed in graphql-js 0.4.8.
Do not merge until https://github.com/graphql/codemirror-graphql/pull/2 is merged and dependency is updated here.

@leebyron any thoughts on getting this merged? I know people in the community are playing with subscriptions, and it could be helpful to be able to test with GraphiQL (since no Relay support exists yet).

Thanks for the reminder, this is good stuff.


Improve cli tool packaging

Reduce dependencies to a minimum (only import really needed dependencies, now even FastAPI is embedded...)

Duplicate with (#710 )


Limitless bardic performance Chexian Diva

Limitless bardic performance don't apply to Diva's new performances.

Did this get resolved? I have updated the database, which likely solves a lot of these problems.

Thanks, everything works now.


Added Tapo L530E

TP-Link Tapo L530E

Thanks for the PR.
I did have a look into the CSV but I notice some strange behaviour/readings at lowest brightness level.
The readings on brightness level 1 (minimum level) matches the readings on level 255 (maximum level).
This would be either a bug in powercalc measure tool, or the integration and/or firmware that controls the Tapo light.
Could you do some tests by setting the brightness to 1 yourself? Or run the measure tool again and see if the light is set to full brightness in the beginning?

Of course, I can do some tests. Do you want me to measure absorption with brightness 1?
Redoing the whole test is really very very long, it lasted almost two days, because at each measure it entered the nudging phase

Maybe it's related to the nudging procedure somehow. Could be related to your smartplug not reporting frequently enough, this causes powercalc to try to nudge to high brightness and back to low brightness to try to force the smartplug to report a new reading.
Anyway, so you still have the measure.log from previous measure session?
We can have a look into that to see what happened exactly in the beginning of the measure script.

You can just start the measure session again and abort after a bit, and have a look into the log and/or the output of the command if they provide any clues.

L530.zip
This is a new measurement, and attached the log file.
There's any difference?

I have checked the logs, and the measure tool is sending the correct brightness levels to HA.
Here is a snippet.
2023-05-22 06:23:59,368 [INFO] Progress: 1%, Estimated time left: 3.5h
2023-05-22 06:23:59,369 [INFO] Changing light to: ColorTempVariation(bri=1, ct=353)
2023-05-22 06:24:10,959 [INFO] Measured power: 7.72
2023-05-22 06:24:10,960 [INFO] Changing light to: ColorTempVariation(bri=1, ct=363)
2023-05-22 06:24:22,668 [INFO] Measured power: 7.78
2023-05-22 06:24:22,668 [INFO] Changing light to: ColorTempVariation(bri=1, ct=373)
2023-05-22 06:24:34,337 [INFO] Measured power: 8.26
2023-05-22 06:24:34,337 [INFO] Changing light to: ColorTempVariation(bri=1, ct=383)
2023-05-22 06:24:46,191 [INFO] Measured power: 8.12
2023-05-22 06:24:46,191 [INFO] Changing light to: ColorTempVariation(bri=1, ct=393)
2023-05-22 06:24:57,808 [INFO] Measured power: 7.06
2023-05-22 06:24:57,809 [INFO] Changing light to: ColorTempVariation(bri=1, ct=400)
2023-05-22 06:25:09,444 [INFO] Measured power: 7.01
2023-05-22 06:25:09,445 [INFO] Changing light to: ColorTempVariation(bri=6, ct=153)
2023-05-22 06:25:09,966 [INFO] Extra waiting for significant CT change...
2023-05-22 06:25:26,439 [INFO] Measured power: 0.78
2023-05-22 06:25:26,439 [INFO] Changing light to: ColorTempVariation(bri=6, ct=163)
2023-05-22 06:25:38,013 [INFO] Measured power: 0.86
2023-05-22 06:25:38,013 [INFO] Changing light to: ColorTempVariation(bri=6, ct=173)
2023-05-22 06:25:49,579 [INFO] Measured power: 0.76
2023-05-22 06:25:49,579 [INFO] Changing light to: ColorTempVariation(bri=6, ct=183)

bri is the brightness level which the light should be set to.
As you can see for brightness 1 the power is way to high. I suspect the light goes to full brightness somehow.
For brightness 6 the power is low, and slowly increasing for further brightness levels.
Could you try setting the light to brightness 1 using the service with HA developer tools? And see what happens. The light should be really dim.
service: light.turn_on
data:
  brightness: 1
target:
  entity_id: light.hanglamp_boven

With brightness= 1 the lamp is not controlled and does not make any changes.
Variations in brightness begin with brightness = 2.
The Tapo application also reports no state change with brightness equale to 1, it only changes value with brightness values equal to or greater than 2

hmm ok, so it definitely seems some bug in the Tapo integration.
I would suggest you set the brightness to 2 manually with the HA service.
And next take note of the power reported by the smart plug.
Than modify the csv file manually for all the brightness 1 levels and set the watt to the value you have taken note of.

Last things before we can merge.
Seems you forgot to modify lines 3-27 in color_temp.csv.
Also only the gzipped files must be submitted. The non gzipped *.csv must be removed.

Last things before we can merge. Seems you forgot to modify lines 3-27 in color_temp.csv.
Also only the gzipped files must be submitted. The non gzipped *.csv must be removed.

I'm sorry... just corrected!

Build still failing unfortunately.
I have checked the job output and validation of hs.csv fails.
Checking hs.csv.gz
Invalid
Max brightness level 65 is less than 250. Measurements probably not finished completely

Could you double check this file? The validator indicates brightness does not go up to 255. So it looks like measurements were aborted in the middle.


BEP44: storing arbitrary data in the DHT

BEP44 is very exciting because it introduces mutable content signed with a public key. With mutable hashes, applications like twitter-style feeds can be built on the DHT which may prove very useful for projects like ssb. libtorrent and utorrent already have support for dht_store but I'm not sure if anybody is using this feature in the wild yet.
I started implementing this BEP on top of the bittorrent-client plugin system, but it doesn't make much sense to implement on top of bittorrent-client because couples strongly with the dht implementation.

http://bittorrent.org/beps/bep_0044.html
http://www.libtorrent.org/dht_store.html

me and @ehd are also quite interested in this. I'm still pretty ignorant of how this code is structured, but... given that we're talking about a DHT protocol extension, it seems like it would make sense to implement it directly here?
@substack if you are already working on this maybe we can collaborate or I can just provide you some $$ assistance? For me the goal would is having a browser nodes be able to bootstrap into a DHT for sharing javascript code.

BEP44 mentions a value size limitation of 1000 bytes, is this going to be a problem? A mutable value could always be a reference to something bigger, like an infoHash. But for immutable values 1K seems to be quite limiting for general purpose usage. Maybe bigger values could be split up into multiple values stored as trees, although there's probably negative performance implications for this.
For the code storage use case @grncdr mentioned: Most content is content-addressable blobs of source code. Ideally those blobs would be stored in the DHT with local nodes (my other computer, a node process on my computer) keeping blobs in persistent storage ready for other peers.

I'll be hacking on this on the plane ride to Uruguay today. I'll report back with progress. It doesn't seem very complicated implementation-wise.

First leg of the flight, first chunk of progress: immutable get/put is working: https://github.com/substack/bittorrent-dht/tree/dht-store
Next I'll get mutable get/put working.

Really nice!

I don't think the 1k limit will be such a problem for my use-case, since you can always point to an immutable hash that points to other immutable hashes as a merkle DAG. That might not have great latency but there are probably ways to pre-fetch content.

Makes sense. I'm curious how much the announce overhead is going to be for many small values that make up a bigger value. As far as I understood DHT peers still need to announce all the keys that they possess.

Mutable get/put work now. I just need to implement the error codes and seq/cas checks.

PR sent! https://github.com/feross/bittorrent-dht/pull/61

Some possible problems with BEP44: https://gist.github.com/substack/eadd13302d785dc13aac#file-results-markdown

Potential problems aside, this patch has been merged into 4.0.0.


When Storage request is jar resource read as InputStream

This works for now.
In the future I'd like to remove this conditional from Storage and FileJournal.  I think we need a separate journal implementation for reading from the JAR resources, as it stands FileJournal won't work as a real journal if you set it to a resource, since it can't write to the file, only replay it.  I will look at cleaning this up as part of my Routing Journal work.


pull request for e2e test at 01/17/2017 12:45:14

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


{"message": "Please wait a few minutes before you try again.", "status": "fail"}

I'm not sure why this problem is occurring, but when I try to open Ramme, I just get this. I would love some help.

According to this thread this happens when there's too many requests. There's a rate limit of 200 requests/hour (https://developers.facebook.com/docs/instagram-api/overview/).


[DDW-280] Update copy for Shelley Testnet

This PR updates the following copy:
https://docs.google.com/document/d/1mf6P1yCCMN9vHl95XIuQMeM_wERDCJpERN4L-RlZibo/edit

Testing Checklist

Slack QA thread
[ ] Test

Review Checklist
Basics

[ ] PR has been assigned and has appropriate labels (feature/bug/chore, release-x.x.x)
[ ] PR is updated to the most recent version of the target branch (and there are no conflicts)
[ ] PR has a good description that summarizes all changes
[ ] PR has default-sized Daedalus window screenshots or animated GIFs of important UI changes:

[ ] In English
[ ] In Japanese

[ ] CHANGELOG entry has been added to the top of the appropriate section (Features, Fixes, Chores) and is linked to the correct PR on GitHub
[ ] Automated tests: All acceptance and unit tests are passing (yarn test)
[ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in development build (yarn dev)
[ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in production build (yarn package / CI builds)
[ ] There are no flow errors or warnings (yarn flow:test)
[ ] There are no lint errors or warnings (yarn lint)
[ ] There are no prettier errors or warnings (yarn prettier:check)
[ ] There are no missing translations (running yarn manage:translations produces no changes)
[ ] Text changes are proofread and approved (Jane Wild / Amy Reeve)
[ ] Japanese text changes are proofread and approved (Junko Oda)
[ ] UI changes look good in all themes (Alexander Rukin)
[ ] Storybook works and no stories are broken (yarn storybook)
[ ] In case of dependency changes yarn.lock file is updated

Code Quality

[ ] Important parts of the code are properly commented and documented
[ ] Code is properly typed with flow
[ ] React components are split-up enough to avoid unnecessary re-renderings
[ ] Any code that only works in main process is neatly separated from components

Testing

[ ] New feature/change is covered by acceptance tests
[ ] New feature/change is manually tested and approved by QA team
[ ] All existing acceptance tests are still up-to-date
[ ] New feature/change is covered by Daedalus Testing scenario
[ ] All existing Daedalus Testing scenarios are still up-to-date

After Review

[ ] Merge the PR
[ ] Delete the source branch
[ ] Move the ticket to done column on the YouTrack board
[ ] Update Slack QA thread by marking it with a green checkmark

I am seeing an error where Daedalus turns in to a blank white screen. Once I refresh it goes back to normal but happens again after a short interval. This happens on Flight and Shelley Testnet builds

Here is the error message as it not clear from the video.This is on the windows builds. Checking Mac now.
Uncaught Invariant Violation: [React Intl] An id must be provided to format a message at invariant (file:///C:/Program%20Files/Daedalus%20Flight/resources/app/dist/renderer/index.js:38522:15)
at formatMessage (file:///C:/Program%20Files/Daedalus%20Flight/resources/app/dist/renderer/index.js:63908:51)
at formatHTMLMessage (file:///C:/Program%20Files/Daedalus%20Flight/resources/app/dist/renderer/index.js:63968:10)
at FormattedHTMLMessage.render (file:///C:/Program%20Files/Daedalus%20Flight/resources/app/dist/renderer/index.js:64800:34)
at Ro (file:///C:/Program%20Files/Daedalus%20Flight/resources/app/dist/renderer/vendor.dll.js:59:69876)
at Io (file:///C:/Program%20Files/Daedalus%20Flight/resources/app/dist/renderer/vendor.dll.js:59:69671)
at yu (file:///C:/Program%20Files/Daedalus%20Flight/resources/app/dist/renderer/vendor.dll.js:59:105470)
at ls (file:///C:/Program%20Files/Daedalus%20Flight/resources/app/dist/renderer/vendor.dll.js:59:96717)
at us (file:///C:/Program%20Files/Daedalus%20Flight/resources/app/dist/renderer/vendor.dll.js:59:96642)
at Qu (file:///C:/Program%20Files/Daedalus%20Flight/resources/app/dist/renderer/vendor.dll.js:59:93672)
DevTools failed to parse SourceMap: file:///C:/Program%20Files/Daedalus%20Flight/resources/app/dist/renderer/preload.js.map

@daniloprates The same issue @ManusMcCole mentioned is also reproducible in Linux. In this case, I was trying to restore a wallet, so when I selected the type, the blank screen was displayed:

Reproducible across all Platforms

@ManusMcCole @gnpf ⏳ checking...

@ManusMcCole @gnpf fixed the issue.

Hi @daniloprates. Byron Wallets are not showing correctly in the sidebar. When I click in to another wallet there is no way to navigate back to the Byron Wallet

Byron Wallet issue happens across all Operating Systems

Byron Wallet issue happens across all Operating Systems

@ManusMcCole could you send me this mnemonics set?

Byron Wallet issue happens across all Operating Systems

@ManusMcCole could you send me this mnemonics set?

Hi Danilo. Sure here it is ....loyal,hurry,wall,fame,police,mushroom,delay,hint,board,assist,forum,exit

Byron Wallet issue happens across all Operating Systems

Thanks, Manus. I ended up removing a check to disable Byron wallets restoration:


Sequence.first(where:) may improve performance for Archive.subscript()

In the Archive.subscript() method, you may prefer to implement it with .first(where:), which will be on average twice as fast as .filter():
https://github.com/weichsel/ZIPFoundation/blob/6611cfcf4343756661ba9d396b2a26ac2a87971d/Sources/ZIPFoundation/Archive.swift#L231
Nice project, by the way.  Very catchy name for it, too. :-)

Nice catch - thanks for pointing that out.


Database backup: safer table backup workflow

Improve https://github.com/ooni/backend/blob/master/analysis/ooni_db_backup.py to create a safer workflow. Each table found in the default database should be listed in /etc/ooni/db-backup.conf and flagged for public backup or private backup or no backup.
If any table is unlisted the DB backup tool should send an alert on Slack
Related to #766

See: https://github.com/ooni/backend/issues/765


ufs.createWriteStream fails when folder exists but file does not

Description
Creating a folder and then writing directly to a file in the folder is a normal usecase that unionfs does not support.
Steps to reproduce
With file
const fs = require('fs')

const { vol } = require('memfs')
const { ufs } = require('unionfs')

ufs.use(vol).use(fs)

const runExampleWith = fsInstance => {
    try {
        fsInstance.mkdirSync('example', { recursive: true })
        const stream = fsInstance.createWriteStream('example/file.txt')
        stream.write('test', () => stream.end())
    } finally {
        fsInstance.rmdirSync('example', { recursive: true })
    }
}

Using the default node fs works
runExampleWith(fs)

Using memfs directly works
runExampleWith(vol)

Using the combined ufs fails with
runExampleWith(ufs)
// Error: ENOENT: no such file or directory, open 'example/file.txt'

Cause
Union fs checks file exists before attempting to use the file systems
https://github.com/streamich/unionfs/blob/302e21a10e12e1854ce92a300ee5dfe9f939a8e8/src/union.ts#L307
Suggestion
import {dirname} from 'path'
// ...
fs.statSync(dirname(path)); //we simply stat first to exit early for mocked fs'es

Related

#384

I've just encountered the problem.


LFS-273: Automatically flag answers upon save based on their values

Initially flags answers as INCOMPLETE if a value is necessary (minAnswers > 0)

Flags answers as INVALID and INCOMPLETE if a solution has been submitted but validation criteria has not been met.

INVALID and INCOMPLETE flags are removed if:

the user has selected at least minAnswers AND
the user has selected at most maxAnswers AND
any additional validation rules have been satisfied.

After retesting I ran into this problem:

go to http://<IP_ADDRESS>:8080/content.html/Forms/2e80f241-c911-4fcb-bb8c-38bda82f4a4e and observe that patientID is not entered
as per http://<IP_ADDRESS>:8080/bin/browser.html/Forms/2e80f241-c911-4fcb-bb8c-38bda82f4a4e/59a05f78-4b11-4645-990d-ec9590a2f58e the StatusFalgs is blank, but it should be INCOMPLETE

Same issue for all fields of the same multi value type such as Comments, Family history, etc.

@sashaandjic For many fields, having zero answers is acceptable and therefore the INCOMPLETE flag will not be set even if the field is empty. If you open /bin/browser.html and look at the tree under jcr:root/Questionnaires/<Questionnaire Name>/<Questionnaire Question> you will see a minAnswers property and a maxAnswers property. If minAnswers is set to zero then submitting the form with this field left empty will not trigger the setting of the INCOMPLETE flag.

@sashaandjic For many fields, having zero answers is acceptable and therefore the INCOMPLETE flag will not be set even if the field is empty. If you open /bin/browser.html and look at the tree under jcr:root/Questionnaires/<Questionnaire Name>/<Questionnaire Question> you will see a minAnswers property and a maxAnswers property. If minAnswers is set to zero then submitting the form with this field left empty will not trigger the setting of the INCOMPLETE flag.

@IntegralProgrammer  I accidentally closed this PR.


Add a warning for the urls cached containing the : char

Sometimes we cache wrong urls in frontend because of mismatching data between the backend router structure and the frontend vue-fetch-route implementation. It would be nice to know with a warning where the vue-fetch-route has found and cached problematic urls.
Something like this should be enouch:
if (/[:|$|{|}]/.test(url)) {
  console.warn('It seems this URL contains wrong chars, could you please double check it?')
}

Fixed via 0.1.3


_.every helper function returns true if last item of collection is true

Steps to reproduce

using angular 1.5 (this should work with other version as well)
implement autocomplete.js with two or more datasets, the first should return false for isEmpty, the last should return true for isEmpty.

You should see
this.isEmpty, located on this line https://github.com/algolia/autocomplete.js/blob/master/src/autocomplete/dropdown.js#L137 returns true
What is the expected behavior?
this.IsEmpty should only be true if ALL the items in this.datasets return true for isEmpty.

_.every's source, for reference
https://github.com/algolia/autocomplete.js/blob/fc9a3b478fd6e61d26854dbc08860d26adeafc9a/src/common/utils.js#L61-L73

looks like the default might need to be false instead of true, if I read MDN's polyfill correctly

I think it has more to with the expectation that line 69 will break the loop. Angular's foreach doesn't behave that way.

https://github.com/algolia/autocomplete.js/pull/274 This gets the job done.


Feature: Web liquidation notification

Codecov Report

Merging #139 (d02f9c7) into master (6508437) will decrease coverage by 0.03%.
The diff coverage is 1.88%.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6508437...d02f9c7. Read the comment docs.


kernel: Add _STATIC variant for object definitions

All existing DEFINE_* macros define objects in global scope. However,
if the same object name is used across multiple module, the result
is a conflict during linkage phase. The goal is to provide STATIC
to these DEFINE* macros, so the user can safely use them in a private
scope.
This commit is fully backward compatible - i.e. it does not change the
implementation of the existing DEFINE_* macros and only adds new ones.
Also, this commit fixes macro formatting inconsistencies across
the whole module. It was inconvenient to create such a vast commit
without fixing the style in the first place.
Signed-off-by: Pavel Hübner<EMAIL_ADDRESS>

Am I misunderstanding? This looks like an API breakage to me. Right now if you have a K_MSGQ_DEFINE(my_queue, ...) in one C file, you can use it anywhere else in your app as "extern struct k_msgq *my_queue;" (to be fair: it would be nicer if we had a K_MSGQ_DECLARE() to do that). This breaks that kind of usage for existing code that was doing things correctly.
I suspect the real bug here is that with other data structures, it's often possible to put a "static" in front of the macro to define a local object. (Linux does this a lot, for example). And that's not possible here because of the need for the prefixed buffer definition.

@andyross Yes, correct - in the end, this could be a breaking change and I will restructure the work.
However, in the comment above, I have proposed a change (and @peter-mitsis has sort of supported it) that we should keep the current definition of K_MSGQ_DEFINE as-is, but introduce new definitions for purely private scoping:

K_PIPE_DEFINE_STATIC
K_MSGQ_DEFINE_STATIC

And maybe some others - I have not yet thoroughly traversed the whole kernel.h but I will refine my commit and we can do another round...

@hubpav Do you plan on picking this up again?

@hubpav Do you plan on picking this up again?

Yep, absolutely - it is on my mind twice a week :) I will be on it this month definitely, thanks.

Yep, absolutely - it is on my mind twice a week :) I will be on it this month definitely, thanks.

Time flies - a month has passed :)

Yep, absolutely - it is on my mind twice a week :) I will be on it this month definitely, thanks.

Time flies - a month has passed :)

I love the reminder :) Thanks a lot @henrikbrixandersen!
In the end, it was a bit more effort than estimated and it resulted in a fair number of code lines changed but I think it is the right direction.
Actually, it should be a preferred option to guide developers to prefer e.g. K_MUTEX_DEFINE_STATIC(...) instead of static K_MUTEX_DEFINE(...). The reason for that is that it removes the ambiguity between such primitives and more complex types which span across multiple definitions.

@hubpav Please rebase on main and resolve the conflicts.

@henrikbrixandersen Done

I think we should have, at least, one test using these macro variants. Also I don't know if copy&paste the documentation is the best approach. Maybe reference the original macro and just document the difference would be better, but I don't what is the guideline for it.

@ceolin I will be happy to write the test but I will need a bit of guidance here. Shall I prepare the test that will define all static initializers with equal names in two files (modules)? The test would succeed if the application builds, so no ztest will be involved. Or do you have any other ideas about this?
About the documentation: We have touched this point in the very first PR of mine which was addressing the same thing - adding K_MEM_SLAB_DEFINE_STATIC :
https://github.com/zephyrproject-rtos/zephyr/pull/39683#discussion_r735660227
Basically, I have no issue to change that though. Will give it a few days if someone else raises their hand...

@ceolin I will be happy to write the test but I will need a bit of guidance here. Shall I prepare the test that will define all static initializers with equal names in two files (modules)? The test would succeed if the application builds, so no ztest will be involved. Or do you have any other ideas about this?
About the documentation: We have touched this point in the very first PR of mine which was addressing the same thing - adding K_MEM_SLAB_DEFINE_STATIC :
#39683 (comment)
Basically, I have no issue to change that though. Will give it a few days if someone else raises their hand...

@dcpleung and @andyross guidance needed here.

Is the question just about tests?  In this case these macros are all very simple, I think a straightforward coverage case that did nothing but define an object using them and use it once would be more than sufficient.  We just want to know it works.

Is the question just about tests? In this case these macros are all very simple, I think a straightforward coverage case that did nothing but define an object using them and use it once would be more than sufficient. We just want to know it works.

@andyross This sounds like a reasonable approach and I agree that automated tests are not truly needed when this gets verified once.
So, I will do the following:

Rebase the code, of course :)
Perform a manual coverage tests on all the macros.
Update the documentation, so we won't duplicate text just for the sake of private/public scoping.

Anything else that should be done?
I can do it no earlier than this weekend.

Oh, to be clear: I meant check in a ztest test case.  I'm just saying it doesn't have to be more than a few lines of code.  Create a semaphore, take/give, etc...

This needs rebasing.

This needs rebasing.

Done.


Do the jobs save on app restart?

Hi. I have cron jobs created dynamically. If I make changes to the app and restart it, will jobs still work?

no, you need to save jobs separately


Expose conversion from glyph ID to CID

When embedding a CIDFont in PDF, CIDs must be used in place of GIDs. Most fonts have an identity mapping, but some don't (mostly CJK ones). For those, the mapping is stored as the charset, but SIDs represent CIDs. From the CFF spec:

The charset data, although in the same format as non-CIDFonts, will represent CIDs rather than SIDs,  [...]

Right now, the GID -> SID functionality in the CFF table is internal to glyph_name, which returns a string (which is None in this case because there are no actual strings for the "fake" SIDs). It would be great to have an exposed to way to extract the mapping with ttf-parser. I attached one possible way to expose this (open to suggestions for a better API). I opted for specifically calling this glyph_cid instead of something like gid_to_sid because it makes semantically more sense and also opted to return None for non-CID fonts.

Thanks for the quick merge! If you could make a release sometime soon, that would be most appreciated. It would be nice if I could ship Typst 0.8 without a git dependency. :)

Sure. Will do.

Thanks!

Done!


add two-party ownership access

https://github.com/su-squares/underlay-ethereum-contract/blob/main/AccessControlTwoOfficers.sol

Maybe I'm being a dummy:  Two-way for whom? Do you mean write code for the Financial Officer to also be able to assign roles?

Renamed issue to "two party". Maybe that's clearer.

Here's the different systems' feature matrix

One party
Two party
Three party

CEO
Can do anything
Can only assign CEO/CFO
Can only assign CEO/CFO/CTO

CFO
---
Can only take Ether
Can only take Ether

CTO
---
---
Can only do contract stuff

Thanks. This makes sense, and seems straightforward enough for this 新手 to
handle.
Assign to me and I'll give it a try this week? This would be my first real
collaborative GitHub effort. I'm excited, but please excuse any faux pas
while I get the hang of things.
On Thu, Feb 24, 2022 at 7:35 AM William Entriken @.***>
wrote:

Renamed issue to "two party". Maybe that's clearer.
Here's the different systems' feature matrix
One party Two party Three party
CEO Can do anything Can only assign CEO/CFO Can only assign CEO/CFO/CTO
CFO --- Can only take Ether Can only take Ether
CTO --- --- Can only do contract stuff
—
Reply to this email directly, view it on GitHub
https://github.com/fulldecent/solidity-template/issues/3#issuecomment-1049332944,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKUPWFNRYG46LL5JIFJ7PDU4VVNHANCNFSM5K65KA4A
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID:
@.***>

--
Daniel Tedesco https://www.linkedin.com/in/danieltedesco/

It's yours!
The task is simply to copy that file into this repository in the appropriate place.
Then maybe add a note into a new README file in that folder.
That's good enough to close this issue. Then long term we'll also need JavaScript tests to verify it works.

Done:  #7
However, this got me thinking:
First, would it make sense instead to rewrite so that two-party access control to inherits from AccessControl.sol? This way,

Gains functionality from AccessControl.sol (i.e. admin privileges and useful functions like hasRole)
Benefits from the tests that have already been written
More coherent with the rest of the template

Second, the terms CEO | executiveOfficer and CFO | financialOfficer have a lot of implications and could confuse people. Why not instead use something that more clearly indicates what they can do:

CEO => roleAssigner
CFO => paymentReceiver

Third, commenting is kind of out of sync across the modules. Maybe worth cleaning that up at some point?
Again, this is my first rodeo, so I welcome calling out any silliness in my thinking!

Nice, thank you!
As for extending AccessControl, this would be a NARROWING of the API. Access control allows the owner to do anything, but the subclass only allows the owner ("CEO") to set roles. It is a violation of object oriented design to have a narrowing subclass.
There is some legacy in the industry here. CryptoKitties and Su Squares have used the CEO/CFO/CTO roles for their project and this has been recycled to the point where many people recognize these specific words with that meaning. Another word that is well known is "Owner" which indicates some unitary control over the contract in a single role. Legacy is not an argument for avoiding new solutions. But the threshold should be that any names we choose should at least be very clear and obvious to casual observers. Role Assigner, to somebody that understands the contract, is clearly very important. But my dad would not recognize that as the most important role like he would for "owner" or "CEO".
Updates for comments is in scope for this project. The preferred format is NatSpec with /// format. I'm working to set a standard for all of Solidity, which we would then simply implement here. Good to proceed if you would like to update that!

Thanks, this is helpful feedback! Will keep these in mind for future
updates.
I'll add comments in the preferred format later this week.
On Tue, Mar 1, 2022 at 12:53 William Entriken @.***>
wrote:

Nice, thank you!
As for extending AccessControl, this would be a NARROWING of the API.
Access control allows the owner to do anything, but the subclass only
allows the owner ("CEO") to set roles. It is a violation of object oriented
design to have a narrowing subclass.
There is some legacy in the industry here. CryptoKitties and Su Squares
have used the CEO/CFO/CTO roles for their project and this has been
recycled to the point where many people recognize these specific words with
that meaning. Another word that is well known is "Owner" which indicates
some unitary control over the contract in a single role. Legacy is not an
argument for avoiding new solutions. But the threshold should be that any
names we choose should at least be very clear and obvious to casual
observers. Role Assigner, to somebody that understands the contract, is
clearly very important. But my dad would not recognize that as the most
important role like he would for "owner" or "CEO".
Updates for comments is in scope for this project. The preferred format is
NatSpec with /// format. I'm working to set a standard for all of
Solidity, which we would then simply implement here. Good to proceed if you
would like to update that!
—
Reply to this email directly, view it on GitHub
https://github.com/fulldecent/solidity-template/issues/3#issuecomment-1055016322,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKUPWD2EDLVM27NQK4RJI3U5RGNHANCNFSM5K65KA4A
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID:
@.***>


Purpose of read and write scopes in samples?

In some examples I've seen the following scopes:
                new Scope
                {
                    Name = "read",
                    DisplayName = "Read data",
                    Type = ScopeType.Resource,
                    Emphasize = false,
                },
                new Scope
                {
                    Name = "write",
                    DisplayName = "Write data",
                    Type = ScopeType.Resource,
                    Emphasize = true,
                },

What's the benefit of such scopes that don't have any claims associated with them and don't describe a web api either? I'm guessing that we check if an authenticated user has; for example, the read scope to let her do something as in the code below?
if(context.Principal.HasClaim("scope", "read"))
{
   //do something here
}

They describe a sample web api -- one API for "reading" data, and another API for "writing" data.

OK. Thank you.


Autostart script/app on container startup

Hi there, is there any way to get a script running un container startup? i've been trying modifiyng the entrypoint or the cmd but cannot get it working. I also tried with desktop files.
My main idea es to launch a bash to call a python script for opening a browser and login automatically. I have a volume mounted with the .sh but cannot get it start. Sorry for bad english.

https://github.com/fcwu/docker-ubuntu-vnc-desktop/issues/85

Hi fcwu sorry for late testing but couldn't get it sooner. I've tried to user the OPENBOX_ARGS but no getting to work. I'm actually using docker-compose and added this as an ENV, edited the /etc/xdg/openbox/autostart file to call my sh script which calls a python one but i think i'm lacking something. this is how my compose line lookslike
  - OPENBOX_ARGS=--startup "/etc/xdg/openbox/autostart"

and this is the line i added to autostart file
/bin/bash/ autostart.sh

@moltrabella Are you solve?

yes i am, after playing a while the env i get it working like a charm

Can you show your code and provide step?

Sure, this is my docker-compose file
version: '3'
services:
test:
image: dorowu/ubuntu-desktop-lxde-vnc
container_name: test1
environment:
- PUID=1000
- PGID=1000
- TZ=America/Argentina/Buenos_Aires
- OPENBOX_ARGS=--startup /config/Ubuntu-VNC/start.sh
volumes:
- /var/lib/docker/volumes/Autologin_test/:/config/Ubuntu-VNC/:ro
networks:
mymacvlan66:
ipv4_address: <IP_ADDRESS>
restart: unless-stopped
networks:
mymacvlan66:
external: true
as you can se i have a volume mounted in the container where i call my script. The trick was the  "- OPENBOX_ARGS=--startup" env. Just runnning a default cointainer with that should call anything on startup


Cannot find module when importing

Hey, my project is using Svelte/SvelteKit and when I import Giscus;
import Giscus from '@giscus/svelte';

I am getting the warning that Cannot find module '@giscus/svelte' or its corresponding type declarations.js(2307)
however, I can import it like this import Giscus from<EMAIL_ADDRESS>but I believe this is causing an issue for me when I try to deploy my project using Vercel
Error: [vite]: Rollup failed to resolve import<EMAIL_ADDRESS>from "/vercel/path0/src/routes/(app)/blog/[slug]/+page.svelte".
--
02:01:39.154 | This is most likely unintended because it can break your application at runtime.
02:01:39.154 | If you do want to externalize this module explicitly add it to
02:01:39.154 | `build.rollupOptions.external`

Well, thanks to ChatGPT I got it working by adding this to my vite.config.js js resolve: { 		alias: [ 			{ 				find: '@giscus/svelte', 				replacement<EMAIL_ADDRESS>		} 		] 	}

I am also getting the  Cannot find module '@giscus/svelte' or its corresponding type declarations.js warning in VsCode and svelte-check output but the application builds correctly which leads me to believe the issue is with the type declaration perhaps?
I do not believe an alias replacement is the best solution in this case and recommend reopening this issue.
This is for a<EMAIL_ADDRESS>application built on linux

Same issue here.
I got the error dissapear by doing
import Giscus from<EMAIL_ADDRESS>instead of
import Giscus from "@giscus/svelte";
I think that this has something todo with the module resolution of typescript.
It works fine if I set "moduleResolution": "NodeNext" in the tsconfig compiler options but then all the sveltekit aliases wont work.

Should be fixed in v2.3.0, please update and confirm. Thanks!

Working now correctly. Thank you


Unable to upgrade to 1.8.x if using Ingress

Describe the bug:
We are using the ingress feature https://cert-manager.io/docs/usage/ingress/
The Certificate objects generated by the integration do not set spec.privateKey.rotationPolicy as required by v1.8.0
https://cert-manager.io/docs/release-notes/release-notes-1.8/#v180
Therefore we are unable to upgrade past 1.7.x
Expected behaviour:
EITHER
A) spec.privateKey.rotationPolicy should just be set to ALWAYS when generated for an Ingress (seems reasonable to me)
B) It can be configured per feature https://github.com/cert-manager/cert-manager/issues/4997 and/or https://github.com/cert-manager/cert-manager/issues/2239
Steps to reproduce the bug:

Use an Ingress in v1.7.x
Look at the generated Certificate and/or try the 1.8.0 upgrade tryout documentation.

$ kubectl get cert -A -ojson | jq -r   '.items[] | select(.spec.privateKey.rotationPolicy | . != "Always" and . != "Never") | "\(.metadata.name) in namespace \(.metadata.namespace) has rotationPolicy=\(.spec.privateKey.rotationPolicy)"'

Observe my-ingress-tls in namespace my-namespace has rotationPolicy=null

Anything else we need to know?:
Thanks
/kind bug

spec.privateKey.rotationPolicy was not made required in v1.8, it is still optional. The only change is that there is now validation for if the field is set (so not nil).
I just checked that ingress-shim is still able to create certs as expected. So this should not stop you from upgrading.

spec.privateKey.rotationPolicy should just be set to ALWAYS when generated for an Ingress (seems reasonable to me)

This is a separate discussion- the reason why it is not set to 'always' despite that being obviously a better practice is for backwards compatibility reasons.

Documentation script no longer false identifies Ingress created Certificates (or any with spec.privateKey.rotationPolicy unspecified) as invalid.