SharePoint Online - React Modern Script Editor - Install Issue - sharepoint-online

Having an issue with the react modern script editor (sp-dev-fx-webparts), on the npm install.
Lots of warnings, and one key error.
I've tried a lot of different things I found on the internet and looking for suggestions:
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
gyp ERR! stack at onErrorNT (internal/child_process.js:468:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:84:21)
gyp ERR! System Windows_NT 10.0.15063
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.12.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.12.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
NPM Version: 6.14.4
Node Version: 14.1.0

"The current supported LTS version of NodeJS for the SharePoint Framework is Node.js v8.x and Node.js v10.x. Notice that 9.x, 11.x or 12.x versions are currently not supported with SharePoint Framework development. Above links are pointing to 10.20.1 version."
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-environment

Go to the Microsoft official site and download the latest verson of Node js .. try to install it again . I faced the same issue and i re install everything and download the latest file and installed. Now all are fine .

Related

nodejs couchbase install failure

I have installed multiple packages like Express, Joi, Fastify without any issue. But when I try to install couchbase package using npm, it's always failing. Please find below the log.
> couchbase#2.6.10 install C:\Users\JInbaraj\Documents\VSCode_Projects\Node-js\Express\node_modules\couchbase
> prebuild-install || node-gyp rebuild
prebuild-install WARN install No prebuilt binaries found (target=12.14.1 runtime=node arch=x64 libc= platform=win32)
C:\Users\JInbaraj\Documents\VSCode_Projects\Node-js\Express\node_modules\couchbase>if not defined npm_config_node_gyp (node "D:\node-v12.14.1-win-x64\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "D:\node-v12.14.1-win-x64\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
gyp ERR! stack at onErrorNT (internal/child_process.js:456:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:81:21)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "D:\\node-v12.14.1-win-x64\\node.exe" "D:\\node-v12.14.1-win-x64\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\JInbaraj\Documents\VSCode_Projects\Node-js\Express\node_modules\couchbase
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! <https://github.com/nodejs/node-gyp/issues>
npm WARN Express#1.0.0 No description
npm WARN Express#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! couchbase#2.6.10 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the couchbase#2.6.10 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\JInbaraj\AppData\Roaming\npm-cache\_logs\2020-01-14T10_42_00_899Z-debug.log
I am using a stable Node JS release. I have tried to reinstall the Node JS. I have tried to reinstall Python 2.7, windows build-essentials and also tried visual studio 2015 tools after referring this link, but all in vain.
Any advice?
Finally the issue is fixed!
Visual studio build tools were shown installed successfully when installed using npm command (I have even tried installing multiple times using npm). Later, I used Visual studio installer and selected Visual studio build tools 2017 to verify the install. To verify the install, I have tried the Repair option and to my surprise, it was just downloaded partially and it resumed from there. Waited for sometime to complete the download and install. Then restarted the PC and tried npm i couchbase... It worked!

Using node module with react native

As mentioned here that,
Any modules that are pure javascript and run within node.js/io.js are perfectly OK to be run in react-native.
I need to resize and crop an image in react native so i was trying the nodejs sharp image processing library and i think it should work with reactnative because its in pure node and working with io things.
But while installing it throws errors:
PS D:\ReactNative\f_sandbox> npm install sharp
> sharp#0.17.3 install D:\ReactNative\f_sandbox\node_modules\sharp
> node-gyp rebuild
D:\ReactNative\f_sandbox\node_modules\sharp>if not defined npm_config_node_gyp (node "G:\Installed\Node\node_modules\npm\bin\node-gyp-bin\\..\..\node_modul
es\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.
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 Visua
l Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [D:\ReactNative\f_sandbox\node_modules\sharp\build
\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (G:\Installed\Node\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_process.js:215:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "G:\\Installed\\Node\\node.exe" "G:\\Installed\\Node\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\ReactNative\f_sandbox\node_modules\sharp
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "G:\\Installed\\Node\\node.exe" "G:\\Installed\\Node\\node_modules\\npm\\bin\\npm-cli.js" "install" "sharp"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! sharp#0.17.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp#0.17.3 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 sharp 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 information on how to open an issue for this project with:
npm ERR! npm bugs sharp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sharp
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\ReactNative\f_sandbox\npm-debug.log
Is there any fix for this/ whats missing here?
This is not an issue with your app but an npm specific issue. You need to use the right msvs_version flag to install io packages that need node-gyp.
This is not a well tested one but first please find the version of .net framework on your machine.
Next use the version as follows
npm install socket.io --msvs_version=2012
Note: Your package name could be different

Error while installing node-oracledb

I have a simple node.js server and some app running on it, that should connect to Oracle database. For that reason I decided to use node-oracledb driver, but I'm having some problems with installation. I followed instructions on Oracle webpage and those on github, but I still get an error below.
My environment configuration:
Windows 8.1 Pro 64 bit
node.js v6.4.0
npm v3.10.3
MS Visual Studio 2013 Community edition
Python v2.7.12
Oracle Instant Client (basic + SDK) v12.1.0.2.0
Node, Python and Oracle Instant Client folders are included in PATH variable. OCI_LIB_DIR and OCI_INC_DIR are also set according to github instructions.
Here's the problem: when I execute command npm install oracledb -g, the following error occurs:
> oracledb#1.11.0 install C:\Users\pr\AppData\Roaming\npm\node_modules\ora
cledb
> node-gyp rebuild
C:\Users\pr\AppData\Roaming\npm\node_modules\oracledb>if not defined npm_c
onfig_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:\Users\pr\AppData\Roaming\npm\node_modules\oracledb\build\oracledb.vcxp
roj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props"
was not found. Confirm that the path in the <Import> declaration is correct, a
nd that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js: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 6.3.9600
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\pr\AppData\Roaming\npm\node_modules\oracledb
gyp ERR! node -v v6.4.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "oracledb" "-g"
npm ERR! node v6.4.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! oracledb#1.11.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the oracledb#1.11.0 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 oracledb 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 information on how to open an issue for this project with:
npm ERR! npm bugs oracledb
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls oracledb
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\pr\Development\Visual Studio 2013\npm-debug.log
I don't really know where to look at for a solution. What could cause that error? Are there any known incompatibilities between node/oracle client/python?
One more thing: github instructions say:
Make sure the Microsoft Visual Studio environment variables are set
appropriately. Use set PATH and verify it contains your Visual Studio
paths. If they are not set, use vcvars64.bat (or vcvars.bat if you
building with 32-bit binaries) to set the environment.
Which VS environment variables should be set and which VS paths should be contained in PATH exactly?
Modules like oracledb or node-oracledb needs compilations. Compilation requires software like C compiler, Python etc.
I was facing the same issue with oracldb module. follow below instructions and it works like charm.
https://community.oracle.com/docs/DOC-931127
try updating npm to the latest version:
npm install -g npm
if it still doesn't work, try including your VS version like so:
npm install oracledb --msvs_version=2013

NPM install failing in windows-7

I am doing NPM install in windows-7 and I don't know why I am getting this error.
C:\xampp\htdocs\dev4\nodejs\node_modules\jsdom\node_modules\contextify>node "C:\
Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules
\node-gyp\bin\node-gyp.js" 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\V120\Microsoft.Cpp.Platform.t
argets(64,5): error MSB8020: The build tools for Visual Studio 2010 (Platform T
oolset = 'v100') cannot be found. To build using the v100 build tools, please i
nstall Visual Studio 2010 build tools. Alternatively, you may upgrade to the c
urrent Visual Studio tools by selecting the Project menu or right-click the sol
ution, and then selecting "Upgrade Solution...". [C:\xampp\htdocs\dev4\nodejs\n
ode_modules\jsdom\node_modules\contextify\build\contextify.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:
12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\nod
e_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\xampp\htdocs\dev4\nodejs\node_modules\jsdom\node_modules\context
ify
gyp ERR! node -v v0.10.31
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! contextify#0.1.9 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify#0.1.9 install script.
npm ERR! This is most likely a problem with the contextify 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 contextify
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\xampp\htdocs\dev4\nodejs
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\xampp\htdocs\dev4\nodejs\npm-debug.log
npm ERR! not ok code 0
I tried to do separate module, but the module is not installed since internally it's dependent to another required module.
I did Google a lot but didn't get any solution.
Any suggestion will be helpful for me.
From your posted error log, node-gyp cannot find a copy of Visual Studio to use in the build process.
From the node-gyp documents for Windows, you need:
Python (v2.7.3 recommended, v3.x.x is not supported)
Windows XP/Vista/7:
Microsoft Visual Studio C++ 2010 (Express version works well)
For 64-bit builds of node and native modules you will also need the Windows 7 64-bit SDK
If the install fails, try uninstalling any C++ 2010 x64&x86 Redistributable that you have installed first.
If you get errors that the 64-bit compilers are not installed you may also need the compiler update for the Windows SDK 7.1
Windows 7/8:
Microsoft Visual Studio C++ 2012/13 for Windows Desktop (Express version works well)
Make sure you have a copy of Visual Studio Express or better installed and try again.
From the node-gyp documents for Windows, you can choice:
Option 1: Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global
--production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).

nodejs_'npm install oracle' occur errors

I've got errors when install oracle on nodejs.
I'm following the steps written in this site (https://github.com/joeferner/node-oracle) and
finally, 'npm install oracle' doesn't work.
I downloaded python2.7.8, visual studio express 2012 for desktop, and instantclient (basic and sdk)
in the same directory named "Project" and also set environment variables in my laptop.
Here is the errors occurred.
C:\dev\Project>npm install oracle
npm WARN package.json Express-web-app#1.0.0 No description
npm WARN package.json Express-web-app#1.0.0 No repository field
npm WARN package.json fs#0.0.2 fs is also the name of a node core module.
npm WARN package.json fs#0.0.2 fs No description
npm WARN package.json fs#0.0.2 fs No repository field
-
> oracle#0.3.7 install C:\dev\Project\node_modules\oracle
> node-gyp rebuild
C:\dev\Project\node_modules\oracle>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python2.7.8", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:103:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:64:11
enter code here
gyp ERR! stack at Object.oncomplete (evalmachine.<anonymous>:107:15)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\dev\Project\node_modules\oracle
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! oracle#0.3.7 install: 'node-gyp rebuild'
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the oracle#0.3.7 install script.
npm ERR! This is most likely a problem with the oracle 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 oracle
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "oracle"
I don't know the reason why errors say 'Can't find python executable.....brr' ...
try setting the python system variable use this tutorial:
http://www.katsbits.com/tutorials/blender/python-path-variable.php
Looks like you're running on Windows.
Please see my comment at https://github.com/joeferner/node-oracle/issues/140#issuecomment-67266788
if it will work. Got mine working using that method. However, since your not using Ubuntu Server x64 14.10 LTS.
You may need to convert /etc/environment to Windows Path.
Try installing on a Virtual Machine to run node apps on a much more community driven support environment OS.
If you decided running instantclient on Ubuntu I have used this guide for installing instantclient and compiling oci8 https://help.ubuntu.com/community/PHPOracle
I made a gist for this.
https://gist.github.com/ChaosPower/e533c0542ad0def26cfb
Please inform me if it works and if not let me try to replicate yours.
npm install npm#install
It is showing an error because It might be possible that you haven't installed NPM latest version.
Not a direct answer to your q, but if you are comfortable in C#, an alternate option is to call .NET in-process and leverage .NET's mature database ecosystem. Refer my answer here.

Resources