npm install using node-gyp works from CLI, fails from TeamCity - npm

I'm stuck with an unreliable build in TeamCity.
When executing an npm install for my project that indirectly uses node-gyp to compile a solution, crucially it only fails with when executed from the TeamCity agent.
[EDIT AFTER ANSWER] The context of execution is from Build Step that executes a custom build.ps1 which automates the build process - covering c#, npm projects, executes unit tests etc. This is to say it isn't a bunch of discrete steps in TeamCity but a single PowerShell command that can execute from any environment.
If I execute from the command line on the same server, same user that the TeamCity Agent runs under, it works fine.
These are the errors from the build agent...
MSBuild: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
Executing Build
configuration: debug
Restoring npm for src\my-corp-app
> scrypt#6.0.3 preinstall D:\IR\my-corp-app\TcBuild\src\my-corp-app\node_modules\scrypt
> node node-scrypt-preinstall.js
> keccak#1.4.0 install D:\IR\my-corp-app\TcBuild\src\my-corp-app\node_modules\keccak
> npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."
> keccak#1.4.0 rebuild D:\IR\my-corp-app\TcBuild\src\my-corp-app\node_modules\keccak
> node-gyp rebuild
D:\IR\my-corp-app\TcBuild\src\my-corp-app\node_modules\keccak>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\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.
D:\IR\my-corp-app\TcBuild\src\my-corp-app\node_modules\keccak\build\keccak.vcxproj(21,3): error MSB4019: The imported project "D:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and 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: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.14393
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:\IR\my-corp-app\TcBuild\src\my-corp-app\node_modules\keccak
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keccak#1.4.0 rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the keccak#1.4.0 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\teamcity_user\AppData\Roaming\npm-cache\_logs\2019-02-13T11_38_48_872Z-debug.log
"Keccak bindings compilation fail. Pure JS implementation will be used."
The work around is to execute the command line, it succeeds, then execute in TeamCity again and the recent artifacts from the command line execution make it skip this node-gyp process and the build succeeds. This workaround is getting tiresome.
I've unsucessfully followed the various googled suggestions for fixing "C:\Microsoft.Cpp.Default.props" was not found errors:
npm install --global --production windows-build-tools
Set / Clear VCTargetsPath
Have also compared the environment variables between my CLI prompt and TeamCity Agent when executing the build but the only differences are the expected additions for TeamCity JRE and build numbers.
Am currently stuck trying to determine what magic makes the install work from an interactive CLI as opposed to TeamCity agent running as a Windows Service
The complete log referred to in the above log has details like
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'rebuild' ]
2 info using npm#6.4.1
3 info using node#v8.12.0
4 verbose run-script [ 'prerebuild', 'rebuild', 'postrebuild' ]
5 info lifecycle keccak#1.4.0~prerebuild: keccak#1.4.0
6 info lifecycle keccak#1.4.0~rebuild: keccak#1.4.0
7 verbose lifecycle keccak#1.4.0~rebuild: unsafe-perm in lifecycle true
8 verbose lifecycle keccak#1.4.0~rebuild: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\IR\my-corp-app\TcBuild\src\my-corp-app-node\node_modules\keccak\node_modules\.bin;D:\IR\my-corp-app\TcBuild\src\my-corp-app-node\node_modules\.bin;C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\IR\my-corp-app\TcBuild\src\my-corp-app-node\node_modules\keccak\node_modules\.bin;D:\IR\my-corp-app\TcBuild\src\my-corp-app-node\node_modules\.bin;C:\Windows\Microsoft.NET\Framework64\v4.0.30319\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Amazon\cfn-bootstrap\;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\dotnet\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;D:\apps\jdbc;C:\Program Files\Git\cmd;D:\apps\OpenSSL-Win64\bin;C:\Program Files\nodejs\;C:\Users\teamcity_user\AppData\Local\Microsoft\WindowsApps;C:\Users\teamcity_user\AppData\Roaming\npm;C:\Users\teamcity_user\.dotnet\tools
9 verbose lifecycle keccak#1.4.0~rebuild: CWD: D:\IR\my-corp-app\TcBuild\src\my-corp-app-node\node_modules\keccak
10 silly lifecycle keccak#1.4.0~rebuild: Args: [ '/d /s /c', 'node-gyp rebuild' ]
11 silly lifecycle keccak#1.4.0~rebuild: Returned: code: 1 signal: null
12 info lifecycle keccak#1.4.0~rebuild: Failed to exec rebuild script
13 verbose stack Error: keccak#1.4.0 rebuild: `node-gyp rebuild`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:915:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid keccak#1.4.0
15 verbose cwd D:\IR\my-corp-app\TcBuild\src\my-corp-app-node\node_modules\keccak
16 verbose Windows_NT 10.0.14393
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "rebuild"
18 verbose node v8.12.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error keccak#1.4.0 rebuild: `node-gyp rebuild`
22 error Exit status 1
23 error Failed at the keccak#1.4.0 rebuild script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Finally solved this by adding an inserting extra (and redundant) PowerShell build step:
Runner Type: PowerShell
Script: SourceCode
Working directory: <the obvious folder>
Script Source: npm install
and it magically worked.
Now, of course I already was executing npm install from deep down inside my build automation build.ps1.
For some reason, the above works and the buried one doesn't. I can't explain why. Confirmed that the execution folder was correct and also used get-command npm from both contexts and the result was the same for both:
CommandType Name Version Source
----------- ---- ------- ------
Application npm.cmd 0.0.0.0 C:\Program Files\nodejs\npm.cmd

Related

IBM blockchain platform Visual Studio Code : Error while Packaging Smart Contract

I'm having trouble figuring out the issue while packaging Smart Contract on the IBM Blockchain Platform on Visual Studio Code. I installed the following:
Node.js v14.16.0
npm 6.14.11
Docker version 19.03.13, build cd8016b6bc
docker-compose version 1.25.5, build unknown
I successfully create a new smart contract project. When I ram command - package open project in Command Pallete.
I received this error message:
> Executing task in folder demoContract: npm run build <
> demoContract#0.0.1 build /home/shubham14/Desktop/Major project - blockchain/demoContract
> tsc
sh: 1: tsc: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! demoContract#0.0.1 build: `tsc`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the demoContract#0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /home/shubham14/.npm/_logs/2021-03-03T11_38_29_505Z-debug.log
The terminal process "/bin/bash '-c', 'npm run build'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
**Debug-log :**
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm#6.14.11
3 info using node#v14.16.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle demoContract#0.0.1~prebuild: demoContract#0.0.1
6 info lifecycle demoContract#0.0.1~build: demoContract#0.0.1
7 verbose lifecycle demoContract#0.0.1~build: unsafe-perm in lifecycle true
8 verbose lifecycle demoContract#0.0.1~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/shubham14/Desktop/Major project - blockchain/demoContract/node_modules/.bin:/home/shubham14/Desktop/jdk-14/bin:/home/shubham14/anaconda3/lib/graphviz:/home/apache-maven-3.6.3/bin:/home/shubham14/anaconda3/bin:/home/shubham14/anaconda3/condabin:/home/shubham14/jdk-14_linux-x64_bin/jdk-14/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle demoContract#0.0.1~build: CWD: /home/shubham14/Desktop/Major project - blockchain/demoContract
10 silly lifecycle demoContract#0.0.1~build: Args: [ '-c', 'tsc' ]
11 info lifecycle demoContract#0.0.1~build: Failed to exec build script
12 verbose stack Error: demoContract#0.0.1 build: `tsc`
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:315:20)
12 verbose stack at maybeClose (internal/child_process.js:1048:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
13 verbose pkgid demoContract#0.0.1
14 verbose cwd /home/shubham14/Desktop/Major project - blockchain/demoContract
15 verbose Linux 5.4.0-42-generic
16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
17 verbose node v14.16.0
18 verbose npm v6.14.11
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error demoContract#0.0.1 build: `tsc`
23 error spawn ENOENT
24 error Failed at the demoContract#0.0.1 build script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
Try running npm install first (and maybe even reloading VS Code afterwards).

I can't install dependencies for React Native Projects correctly

So I tried running a React Native project in my android emulator using Expo, but every time I install someone else's project, I'm not able to run it.
This is how I install the project along with its dependencies:
> git clone https://github.com/nabendu82/NativeRestaurantSearc.git
> cd NativeRestaurantSearc
> npm install
> npm start
When I run all this, I recieve this error message:
error Invalid regular expression: /(.*\\__fixtures__\\.*|node_modules[\\\]react[\\\]dist[\\\].*|website\\node_modules\\.*|heapCapture\\bundle\.js|.*\\__tests__\\.*)$/: Unterminated character class.
Metro Bundler process exited with code 1
Set EXPO_DEBUG=true in your env to view the stack trace.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # start: `expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # start 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\Yassi\AppData\Roaming\npm-cache\_logs\2020-04-18T10_46_25_411Z-debug.log
This is a complete log of the run:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Yassi\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm#6.13.6
3 info using node#v12.16.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle #~prestart: #
6 info lifecycle #~start: #
7 verbose lifecycle #~start: unsafe-perm in lifecycle true
8 verbose lifecycle #~start: PATH: C:\Users\Yassi\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Yassi\Bureaublad\React Native\NativeRestaurantSearc\node_modules\.bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Git\cmd;C:\Users\Yassi\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files (x86)\Yarn\bin\;C:\Program Files (x86)\Graphviz2.38\bin\dot.exe;C:\Users\Yassi\AppData\Local\Continuum\anaconda3;C:\Users\Yassi\Ap;C:\Program Files\nodejs\;C:\Users\Yassi\AppData\Local\Continuum\anaconda3;C:\Users\Yassi\AppData\Local\Continuum\anaconda3\Library\mingw-w64\bin;C:\Users\Yassi\AppData\Local\Continuum\anaconda3\Library\usr\bin;C:\Users\Yassi\AppData\Local\Continuum\anaconda3\Library\bin;C:\Users\Yassi\AppData\Local\Continuum\anaconda3\Scripts;C:\Users\Yassi\AppData\Local\Microsoft\WindowsApps;C:\Users\Yassi\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Yassi\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\Yassi\AppData\Local\Yarn\bin;C:\Users\Yassi\AppData\Local\Continuum\anaconda3\Library\bin\graphviz;C:\Users\Yassi\Documents\stardog-7.0.1;C:\Users\Yassi\AppData\Roaming\npm
9 verbose lifecycle #~start: CWD: C:\Users\Yassi\Bureaublad\React Native\NativeRestaurantSearc
10 silly lifecycle #~start: Args: [ '/d /s /c', 'expo start' ]
11 silly lifecycle #~start: Returned: code: 1 signal: null
12 info lifecycle #~start: Failed to exec start script
13 verbose stack Error: # start: `expo start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\Yassi\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:311:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\Yassi\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:311:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid #
15 verbose cwd C:\Users\Yassi\Bureaublad\React Native\NativeRestaurantSearc
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Yassi\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.16.1
19 verbose npm v6.13.6
20 error code ELIFECYCLE
21 error errno 1
22 error # start: `expo start`
22 error Exit status 1
23 error Failed at the # start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I think this has to do with npm not installing the dependencies correctly. There must be going something wrong when I do this, because this is the message I recieve when I run npm install:
added 809 packages from 438 contributors and audited 37723 packages in 119.347s
found 1072 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
What can I do to fix this? I tried reinstalling npm but that doesn't work.

Getting error "botium-cli is not recognized as an internal or external command, operable program or batch file"

I have a project in WebStorm with botium tests. My developer has helped me open the project and the configuration for test:botium:local. When I press the run for test:botium:local, I should get the results of botium tests. I am on Windows 10.
Instead I get this output:
"C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" run test:botium:local --scripts-prepend-node-path=auto
> chatbot-backend#1.0.0 test:botium:local C:\Users\julie\Botium\<my repo>
> botium-cli run --config botium.local.json --convos botium/convos
'botium-cli' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chatbot-backend#1.0.0 test:botium:local: `botium-cli run --config botium.local.json --convos botium/convos `
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chatbot-backend#1.0.0 test:botium:local 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\julie\AppData\Roaming\npm-cache\_logs\2019-08-29T23_17_10_452Z-debug.log
Process finished with exit code 1
In my system environment variables, under edit environment variable, I have C:\Program Files\nodejs\
If I type npm -v in my terminal, I see that it's on 6.4.16.4.1
If I type botium-cli -V in my terminal, I get 'botium-cli' is not recognized as an internal or external command, operable program or batch file
If I reinstall through npm install -g botium-cli on my terminal, it appears to download again and says botium-cli##0.0.53 at the end, updated 1 package
If I go to My C:\users\julie\AppData\Roaming\npm\node_modules there is a botium-cli folder
If I open my command line, by default I'm in Program Files\nodejs and if I type botium-cli -V I get back 0.0.530.0.53
If I navigate to the Users/julie/Botium folder where my project is and type botium-cli -V, I get back the not recognized error even though I can download it there on powershell
The edit configuration script is: "test:botium:local": "./botiumChangeConfigUrls.sh botium.json botium.local.json && botium-cli run --config botium.local.json --convos botium/convos ",
I've rebooted my PC
I've looked all over stack overflow and google
Here is the log file mentioned in the terminal:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'test:botium:local',
1 verbose cli '--scripts-prepend-node-path=auto' ]
2 info using npm#6.4.1
3 info using node#v10.11.0
4 verbose run-script [ 'pretest:botium:local',
4 verbose run-script 'test:botium:local',
4 verbose run-script 'posttest:botium:local' ]
5 info lifecycle chatbot-backend#1.0.0~pretest:botium:local: chatbot-backend#1.0.0
6 info lifecycle chatbot-backend#1.0.0~test:botium:local: chatbot-backend#1.0.0
7 verbose lifecycle chatbot-backend#1.0.0~test:botium:local: unsafe-perm in lifecycle true
8 verbose lifecycle chatbot-backend#1.0.0~test:botium:local: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\julie\Botium\chatbot-poc\node_modules\.bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin;C:\app\julie\virtual\product\12.2.0\dbhome_1\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\julie\AppData\Local\Android\Sdk\tools\bin;C:\Users\julie\AppData\Local\Android\Sdk\tools;C:\Users\julie\AppData\Local\Android\Sdk\platform-tools;C:\Program Files (x86)\PICT\;C:\Program Files\Java\jdk1.8.0_171\bin;C:\Maven\apache-maven-3.6.1\bin;C:\Python27;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Users\julie\ApacheJmeter\apache-jmeter-5.0\bin;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Users\julie\AppData\Local\Android\Sdk\tools\bin;C:\Users\julie\AppData\Local\Android\Sdk\tools;C:\Users\julie\AppData\Local\Android\Sdk\platform-tools;C:\Program Files\Git\cmd;C:\Program Files (x86)\PICT\;C:\Program Files\Java\jdk1.8.0_171\bin;C:\Maven\apache-maven-3.5.4-bin\apache-maven-3.5.4\bin;C:\Python27;C:\Ruby24-x64\bin;C:\Users\julie\AppData\Local\GitHubDesktop\bin;C:\Users\julie\AppData\Local\Microsoft\WindowsApps;C:\Users\julie\AppData\Local\atom\bin;C:\Users\julie\eclipse-workspace\SceneBuilder\jtds\jtds-1.3.1.jar;;C:\Users\julie\AppData\Local\Microsoft\WindowsApps;C:\Users\julie\AppData\Local\Programs\Microsoft VS Code\bin
9 verbose lifecycle chatbot-backend#1.0.0~test:botium:local: CWD: C:\Users\julie\Botium\chatbot-poc
10 silly lifecycle chatbot-backend#1.0.0~test:botium:local: Args: [ '/d /s /c',
10 silly lifecycle 'botium-cli run --config botium.local.json --convos botium/convos ' ]
11 silly lifecycle chatbot-backend#1.0.0~test:botium:local: Returned: code: 1 signal: null
12 info lifecycle chatbot-backend#1.0.0~test:botium:local: Failed to exec test:botium:local script
13 verbose stack Error: chatbot-backend#1.0.0 test:botium:local: `botium-cli run --config botium.local.json --convos botium/convos `
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid chatbot-backend#1.0.0
15 verbose cwd C:\Users\julie\Botium\chatbot-poc
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test:botium:local" "--scripts-prepend-node-path=auto"
18 verbose node v10.11.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error chatbot-backend#1.0.0 test:botium:local: `botium-cli run --config botium.local.json --convos botium/convos `
22 error Exit status 1
23 error Failed at the chatbot-backend#1.0.0 test:botium:local script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
In case it helps anyone, I re-ran an npm install and then npm run in the folder where my project was seemed to fix the issue
Add C:\users\julie\AppData\Roaming\npm to your %PATH% environment variable.

How to fix build command issue?

I want to try Tailwind CSS but I meet an issue when I launch "npm run build".
The console returns : tailwind command not found. However I successfully installed it.
I upgrade Node and npm.
this error message :
OnePage#1.0.0 build /Users/ted/Documents/Dweb/HTML : CSS/Projets/OnePage
tailwind build src/css/tailwind.css -o dist/css/tailwind.css
sh: tailwind: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! OnePage#1.0.0 build: `tailwind build src/css/tailwind.css -o dist/css/tailwind.css`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the OnePage#1.0.0 build 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! /Users/ted/.npm/_logs/2019-06-15T18_11_03_382Z-debug.log
iMac-de-Ted:OnePage ted$ sudo npm run start
npm ERR! missing script: start
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ted/.npm/_logs/2019-06-15T18_13_18_897Z-debug.log
------------------------------------------------------------------
this is my bug log :
info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run',
'build' ] info using npm#6.9.0
3 info using node#v12.4.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle OnePage#1.0.0~prebuild: OnePage#1.0.0
6 info lifecycle OnePage#1.0.0~build: OnePage#1.0.0
7 verbose lifecycle OnePage#1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle OnePage#1.0.0~build: PATH:
/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/ted/Documents/Dweb/HTML
:
CSS/Projets/OnePage/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle OnePage#1.0.0~build: CWD:
/Users/ted/Documents/Dweb/HTML : CSS/Projets/OnePage
10 silly lifecycle OnePage#1.0.0~build: Args: [ 10 silly lifecycle
'-c',
10 silly lifecycle 'tailwind build src/css/tailwind.css -o
dist/css/tailwind.css' 10 silly lifecycle ]
11 info lifecycle OnePage#1.0.0~build: Failed to exec build script 12
verbose stack Error: OnePage#1.0.0 build: tailwind build
src/css/tailwind.css -o dist/css/tailwind.css
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.
(/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:200:13)
12 verbose stack at maybeClose (internal/child_process.js:1021:16)
12 verbose stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:283:5)
13 verbose pkgid OnePage#1.0.0
14 verbose cwd /Users/ted/Documents/Dweb/HTML : CSS/Projets/OnePage
15 verbose Darwin 18.6.0
16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run"
"build"
17 verbose node v12.4.0
18 verbose npm v6.9.0
19 error file sh
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error OnePage#1.0.0 build: tailwind build src/css/tailwind.css -o
dist/css/tailwind.css
23 error spawn ENOENT
24 error Failed at the OnePage#1.0.0 build script.
24 error This is probably not a problem with npm. There is likely
additional logging output above. 25 verbose exit [ 1, true ]

gyp error installing karma

First time asking a question, sorry if I mess it up.
I am trying to install karma, I would prefer a local install but can't get it to install globally or locally. Strangely enough karma and karma-cli seem to install however they won't run no matter what I try.
C:\Users\rdana\AppData\Roaming\npm\node_modules\karma\node_modules\
socket.io\node_modules\socket.io-client\node_modules\engine.io-
client\node_modules\ws\node_modules\bufferutil>
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:\Users\rdana\AppData\Roaming\npm\node_modules\karma\
node_modules\socket.io\node_modules\socket.io-
client\node_modules\engine.io-
client\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj(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,and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error:
`C:\Program Files (x86)\MSBuild\12.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\rdana\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate#1.2.1
npm WARN optional dep failed, continuing bufferutil#1.2.1
I have consulted other posts with this error
npm install -g karma error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found
I have tried "npm install -g karma --msvs_version=2013"
I have Visual Studio 2012 on my machine, I have Python 2.7.3 as well.I have uninstalled and reinstalled node-gyp. I haven't messed with any of the Windows SDK, then VS SP1, then a VC++ compiler stuff yet because this is a work machine and I don't have local admin rights to download software.
At this point I am kind of stuck. Any help would be appreciated.
As mentioned before,I have also installed the CLI tool for karma. I have added npm/node to my path. Maybe the reason karma won't run is some executable issues I saw in some posts floating around but I figured I would post on here because of the install issues first.
Thanks again in advance!