0

I'm looking to run the MyHR CSharp sample app in my Visual Studio 2019.

I have followed the steps in the Github manual installation notes, I am getting stuck in getting it to run the localhost5001. Instead, when I run "npm start" from the project folder, it is asking for eslint. I have installed eslint per eslint's guide but it is still seeking this info.

I have the prereps such as C# .NET Core version 3.1 and Node.js v10+ on my Windows computer, and am using PowerShell.

PS C:\Users\windowsusername\OneDrive\Documents\GitHub\sample-app-myhr-csharp> n npm start

> docusign.myhr@0.0.0 start C:\Users\windowsusername
> npm run lint && echo Starting && ng serve


> docusign.myhr@0.0.0 lint C:\Users\windowsusername
> eslint "**/*.ts" --quiet --fix


Oops! Something went wrong! :(

ESLint: 7.5.0

ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:

    eslint --init

ESLint looked for configuration files in C:\Users\windowsusername\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\html-language-features\server\lib and its ancestors. If it found none, it then looked in your home directory.

If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://eslint.org/chat

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! docusign.myhr@0.0.0 lint: `eslint "**/*.ts" --quiet --fix`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the docusign.myhr@0.0.0 lint 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\windowsusername\AppData\Roaming\npm-cache\_logs\2020-07-26T11_14_04_620Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! docusign.myhr@0.0.0 start: `npm run lint && echo Starting && ng serve`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the docusign.myhr@0.0.0 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\windowsusername\AppData\Roaming\npm-cache\_logs\2020-07-26T11_14_04_669Z-debug.log

Details from the log are:

 info it worked if it ends with ok
1 verbose cli [
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   'start'
1 verbose cli ]
2 info using npm@6.14.6
3 info using node@v12.18.3
4 verbose config Skipping project config: C:\Users\windowsusername/.npmrc. (matches userconfig)
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info lifecycle docusign.myhr@0.0.0~prestart: docusign.myhr@0.0.0
7 info lifecycle docusign.myhr@0.0.0~start: docusign.myhr@0.0.0
8 verbose lifecycle docusign.myhr@0.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle docusign.myhr@0.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\windowsusername\node_modules\.bin;C:\Program Files\PowerShell\7;C:\Python38\Scripts\;C:\Python38\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\PowerShell\7\;C:\Program Files (x86)\PuTTY\;C:\Users\windowsusername\AppData\Local\Microsoft\WindowsApps;C:\Users\windowsusername\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\windowsusername\.dotnet\tools;C:\WINDOWS\system32;C:\Program Files\Git\usr\bin;C:\Users\windowsusername\AppData\Local\GitHubDesktop\bin;C:\Users\windowsusername\AppData\Roaming\npm;C:\Program Files\heroku\bin
10 verbose lifecycle docusign.myhr@0.0.0~start: CWD: C:\Users\windowsusername
11 silly lifecycle docusign.myhr@0.0.0~start: Args: [ '/d /s /c', 'npm run lint && echo Starting && ng serve' ]
12 silly lifecycle docusign.myhr@0.0.0~start: Returned: code: 2  signal: null
13 info lifecycle docusign.myhr@0.0.0~start: Failed to exec start script
14 verbose stack Error: docusign.myhr@0.0.0 start: `npm run lint && echo Starting && ng serve`
14 verbose stack Exit status 2
14 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
14 verbose stack     at EventEmitter.emit (events.js:315:20)
14 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
14 verbose stack     at ChildProcess.emit (events.js:315:20)
14 verbose stack     at maybeClose (internal/child_process.js:1021:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
15 verbose pkgid docusign.myhr@0.0.0
16 verbose cwd C:\Users\windowsusername\OneDrive\Documents\GitHub\sample-app-myhr-csharp
17 verbose Windows_NT 10.0.19041
18 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 verbose node v12.18.3
20 verbose npm  v6.14.6
21 error code ELIFECYCLE
22 error errno 2
23 error docusign.myhr@0.0.0 start: `npm run lint && echo Starting && ng serve`
23 error Exit status 2
24 error Failed at the docusign.myhr@0.0.0 start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 2, true ]

Visual Studio error after F5

2 Answers2

1

Microsoft makes everything simple (in theory) for you. So you don't need to run commands like "npm install" etc. but instead you just hit F5 from Visual Studio and it would take care of everything, including using IIS Express. This should eventually (may take 2-3 min) open a browser to a port like https://localhost:44392/ and the UI will show. To do anything beyond that you will have to update your configuration file with secrets.

Inbar Gazit
  • 12,566
  • 1
  • 16
  • 23
  • Thanks Inbar, I tried that earlier but figured I might be doing something wrong as I receive this error when I hit F5 in Visual Studio 2019. Screenshot attached to comment above for easy reference. `"The Application is in break mode. Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. The program '[4124] DocuSign.MyHR.dll' has exited with code 0 (0x0)."` – dejavuguides Jul 27 '20 at 05:34
  • Okay managed to fix this error. I needed to make sure solution was open for the proper IIS Express option to be noted in the debug window. – dejavuguides Jul 27 '20 at 11:31
1

Just sharing conclusion details here for reference.

Make sure solution was open (double click on DocuSign.MyHR.sln" "enter image description here for the proper IIS Express option to appear. Else it will break.

You want to see DocusignSign.MyHR appear next to the IIS Express button. enter image description here