2020. 3. 7. 05:03ㆍ카테고리 없음
Setting up your environment for building native Node.js modules.Many Gatsby plugins and themes require building native Node.js modules, e.g.To do so, you need a functional build environment (Python and Visual C BuildTools).The easy way to setup your build environment on Windows is to install thepackage by running npm install windows-build-tools -g on an admin PowerShellconsole. Upon installing this package, it downloads and installs Visual CBuild Tools 2015, provided free of charge by Microsoft. These tools are requiredto compile popular native modules. It will also install Python 2.7, configuringyour machine and npm appropriately.If your windows-build-tools installation stalls after Visual Studio Build Tools finishes, might help. If npm install still failsSometimes the windows-build-tools won’t properly install the requiredlibraries.
This is true if you already have a regular.NET developmentenvironment setup. This has been reported on Windows 10 x64 (and possibly otherarchitectures or Windows versions).This might be your problem if, after running npm install on a Gatsby site, yousee compilation errors such as node-gyp or sharp or binding.gyp not found.If you suspect this is your problem, download the(also available from this )and install only the part of the package that interests us: Programming languages Visual C Common tools for Visual Studio 2015. Be sure todownload the 2015 version of VS Community. For Visual Studio 2017, see instructions below.
Visual Studio 2015 Prerequisites : Fatal Error During Installation.
You can uncheck everything else. You don’t need to install the fullVS2015 Express on your system and this won’t mess up your existing VS201xinstalls.Then run the commands on Gatsby.
Npm installYou should then be all set.If that still doesn’t work, refer to theforfurther instructions and contact the node-gypteam on. Gatsby-plugin-sharp requires Node x64Some plugins which depend on native NPM dependencies require the Node x64 build of Node.js. If you’re struggling to install gatsby-plugin-sharp, try installing Node x64 and removing nodemodules and running npm install. Gatsby-plugin-sharp requires libvipsSharp uses a C library, libvips.
If you are having issues while installing Sharp, try removing C:UsersuserAppDataRoamingnpm-cachelibvips. Windows Subsystem for LinuxIf the installation of dependencies or developing on Windows in general gives you headaches, Windows 10 provides a great alternative:. It lets you run most command-line tools, utilities, and applications in a GNU/Linux environment directly on Windows, unmodified, without the overhead of a virtual machine. In the above scenario you would download e.g. Ubuntu, open the terminal, and run sudo apt-get install build-essential in the terminal — and the compilation works way more reliable.
Visual Studio Core Features Fatal Error During Installation
Please note that you have to delete any existing nodemodules folder in your project and re-install the dependencies in your WSL environment.You can also visit to learn more. Expand All Documentation.