vs code extension test script does not run and fail with npm ERR! code ELIFECYCLE - testing

following are the version details
Version: 1.74.3 (user setup)
Commit: 97dec172d3256f8ca4bfb2143f3f76b503ca0534
Date: 2023-01-09T16:59:02.252Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.22000
Sandboxed: No
creating an extension and write test cases for common method file and when run with debug panel from activity bar ( which use launch.json) then it run and give test result also but when run below in terminal
npm run test
it failed with below output
D:\Developer\color-extension>npm run test
> my-extension#0.0.1 pretest D:\Developer\color-extension
> npm run compile && npm run lint
> my-extension#0.0.1 compile D:\Developer\color-extension
> tsc -p ./
> my-extension#0.0.1 lint D:\Developer\color-extension
> eslint src --ext ts
> my-extension#0.0.1 test D:\Developer\color-extension
> node ./out/test/runTest.js
Failed to run tests
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-extension#0.0.1 test: `node ./out/test/runTest.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-extension#0.0.1 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
and here is additional log
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:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'test'
1 verbose cli ]
2 info using npm#6.14.15
3 info using node#v14.17.6
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info lifecycle my-extension#0.0.1~pretest: my-extension#0.0.1
6 verbose lifecycle my-extension#0.0.1~pretest: unsafe-perm in lifecycle true
7 verbose lifecycle my-extension#0.0.1~pretest: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\Developer\color-collector\node_modules\.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files\dotnet\;C:\Program Files\PowerShell\7\;C:\Users\User\AppData\Local\Microsoft\WindowsApps;C:\Users\User\AppData\Roaming\npm;C:\Users\User\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\User\AppData\Local\GitHubDesktop\bin;C:\xampp\php;C:\Users\User\composer;C:\Users\User\AppData\Roaming\Composer\vendor\bin;C:\Program Files\Sublime Text\;;C:\Users\User\AppData\Local\Programs\oh-my-posh\bin
8 verbose lifecycle my-extension#0.0.1~pretest: CWD: D:\Developer\color-collector
9 silly lifecycle my-extension#0.0.1~pretest: Args: [ '/d /s /c', 'npm run compile && npm run lint' ]
10 silly lifecycle my-extension#0.0.1~pretest: Returned: code: 0 signal: null
11 info lifecycle my-extension#0.0.1~test: my-extension#0.0.1
12 verbose lifecycle my-extension#0.0.1~test: unsafe-perm in lifecycle true
13 verbose lifecycle my-extension#0.0.1~test: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\Developer\color-collector\node_modules\.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files\dotnet\;C:\Program Files\PowerShell\7\;C:\Users\User\AppData\Local\Microsoft\WindowsApps;C:\Users\User\AppData\Roaming\npm;C:\Users\User\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\User\AppData\Local\GitHubDesktop\bin;C:\xampp\php;C:\Users\User\composer;C:\Users\User\AppData\Roaming\Composer\vendor\bin;C:\Program Files\Sublime Text\;;C:\Users\User\AppData\Local\Programs\oh-my-posh\bin
14 verbose lifecycle my-extension#0.0.1~test: CWD: D:\Developer\color-collector
15 silly lifecycle my-extension#0.0.1~test: Args: [ '/d /s /c', 'node ./out/test/runTest.js' ]
16 silly lifecycle my-extension#0.0.1~test: Returned: code: 1 signal: null
17 info lifecycle my-extension#0.0.1~test: Failed to exec test script
18 verbose stack Error: my-extension#0.0.1 test: `node ./out/test/runTest.js`
18 verbose stack Exit status 1
18 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
18 verbose stack at EventEmitter.emit (events.js:400:28)
18 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
18 verbose stack at ChildProcess.emit (events.js:400:28)
18 verbose stack at maybeClose (internal/child_process.js:1055:16)
18 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
19 verbose pkgid my-extension#0.0.1
20 verbose cwd D:\Developer\color-collector
21 verbose Windows_NT 10.0.22000
22 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test"
23 verbose node v14.17.6
24 verbose npm v6.14.15
25 error code ELIFECYCLE
26 error errno 1
27 error my-extension#0.0.1 test: `node ./out/test/runTest.js`
27 error Exit status 1
28 error Failed at the my-extension#0.0.1 test script.
28 error This is probably not a problem with npm. There is likely additional logging output above.
29 verbose exit [ 1, true ]
package.json
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js",
"coverage": "c8 --check-coverage npm run test"
},
"devDependencies": {
"#types/glob": "^8.0.0",
"#types/mocha": "^10.0.1",
"#types/node": "16.x",
"#types/vscode": "^1.74.0",
"#typescript-eslint/eslint-plugin": "^5.45.0",
"#typescript-eslint/parser": "^5.45.0",
"#vscode/test-electron": "^2.2.0",
"c8": "^7.12.0",
"eslint": "^8.28.0",
"glob": "^8.0.3",
"mocha": "^10.1.0",
"typescript": "^4.9.3"
}
what could be the issue here? As far as I see it run posttest script but there is no posttet script added in package.json, is that the reason because I have created this extension and the package.json generated by yo generator.
re run npm install and npm cache clean --force too but no benifit.

it was node version issue but not displaying in any error. when I delete the node_modules and do npm install again then it tell electron require v 16 and more so after updating the node version , able to execute the test command.

Related

erro:This is probably not a problem with npm. There is likely additional logging output above

In my project, I'm using VueCli for the frontend. Now what I'm trying to do is deploy my project which is in remote server into the actual server. I'm using npm run build command to build the frontend first. But I can't build my project since the following error occurs again and again
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mobile-h5#0.1.0 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mobile-h5#0.1.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/daisywu/.npm/_logs/2021-09-24T06_13_06_000Z-debug.log
I delete package-lock.json and node_modules,then do npm cache clean --force,then do npm install,Still unable to construct
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.9
3 info using node#v14.15.3
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle mobile-h5#0.1.0~prebuild: mobile-h5#0.1.0
6 info lifecycle mobile-h5#0.1.0~build: mobile-h5#0.1.0
7 verbose lifecycle mobile-h5#0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle mobile-h5#0.1.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/daisywu/Documents/mobile-h5/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle mobile-h5#0.1.0~build: CWD: /Users/daisywu/Documents/mobile-h5
10 silly lifecycle mobile-h5#0.1.0~build: Args: [ '-c', 'vue-cli-service build' ]
11 silly lifecycle mobile-h5#0.1.0~build: Returned: code: 1 signal: null
12 info lifecycle mobile-h5#0.1.0~build: Failed to exec build script
13 verbose stack Error: mobile-h5#0.1.0 build: `vue-cli-service build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid mobile-h5#0.1.0
15 verbose cwd /Users/daisywu/Documents/mobile-h5
16 verbose Darwin 20.3.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v14.15.3
19 verbose npm v6.14.9
20 error code ELIFECYCLE
21 error errno 1
22 error mobile-h5#0.1.0 build: `vue-cli-service build`
22 error Exit status 1
23 error Failed at the mobile-h5#0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Please help thank you
The reason is insufficient memory. Update the answer for your reference
Written in package.json
"build": "node --max_old_space_size=4096 node_modules/#vue/cli-service/bin/vue-cli-service.js build --mode development"
do npm run build

Webpack error compiling theme in Prestashop

Trying to compile theme (named foo) in Prestashop:
cd themes/foo/_dev
npm run build
Get the following error.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! prestashop-classic-dev-tools#1.0.0 build: `webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the prestashop-classic-dev-tools#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! /root/.npm/_logs/2021-07-02T05_58_35_445Z-debug.log
Here is the log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using npm#6.14.13
3 info using node#v14.17.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle prestashop-classic-dev-tools#1.0.0~prebuild: prestashop-classic-dev-tools#1.0.0
6 info lifecycle prestashop-classic-dev-tools#1.0.0~build: prestashop-classic-dev-tools#1.0.0
7 verbose lifecycle prestashop-classic-dev-tools#1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle prestashop-classic-dev-tools#1.0.0~build: PATH: /usr/lib/node_modules/npm/node_mod$
9 verbose lifecycle prestashop-classic-dev-tools#1.0.0~build: CWD: /var/www/html/themes/foo$
10 silly lifecycle prestashop-classic-dev-tools#1.0.0~build: Args: [ '-c', 'webpack' ]
11 silly lifecycle prestashop-classic-dev-tools#1.0.0~build: Returned: code: 2 signal: null
12 info lifecycle prestashop-classic-dev-tools#1.0.0~build: Failed to exec build script
13 verbose stack Error: prestashop-classic-dev-tools#1.0.0 build: `webpack`
13 verbose stack Exit status 2
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle$
13 verbose stack at EventEmitter.emit (events.js:376:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle$
13 verbose stack at ChildProcess.emit (events.js:376:20)
13 verbose stack at maybeClose (internal/child_process.js:1055:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid prestashop-classic-dev-tools#1.0.0
15 verbose cwd /var/www/html/themes/foo/_dev
16 verbose Linux 5.8.0-59-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
18 verbose node v14.17.0
19 verbose npm v6.14.13
20 error code ELIFECYCLE
21 error errno 2
22 error prestashop-classic-dev-tools#1.0.0 build: `webpack`
22 error Exit status 2
23 error Failed at the prestashop-classic-dev-tools#1.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
npm version is:
> npm -v
6.14.13
What could be the cause?
Cause of the issue not found. Resolved with the following commands:
Clean npm cache
> npm cache clean --force
Remove node modules
> rm -rf node_modules package-lock.json
Install npm
> npm install
Run build
> npm run build

npm error code ELIFECYCLE when pressing CTRL+C

I've built a web scraping tool using mainly puppeteer for backend and inquirer.js for the CLI.
I want the end user to be able to exit the process without errors by pressing CTRL + C. This works perfectly when running node built/index.js, but when running npm start, pressing CTRL + C results in an error:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jmtool#1.0.0 start: `node built/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jmtool#1.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\Andi\AppData\Roaming\npm-cache\_logs\2020-07-28T09_46_38_541Z-debug.log
Here's the full log file:
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 'start' ]
2 info using npm#6.4.1
3 info using node#v10.15.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle jmtool#1.0.0~prestart: jmtool#1.0.0
6 info lifecycle jmtool#1.0.0~start: jmtool#1.0.0
7 verbose lifecycle jmtool#1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle jmtool#1.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Andi\OneDrive - Fachhochschule Dortmund\Bachelorarbeit\jmtool\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\nodejs\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\Andi\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\;C:\Users\Andi\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Andi\AppData\Roaming\npm;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;
9 verbose lifecycle jmtool#1.0.0~start: CWD: C:\Users\Andi\OneDrive - Fachhochschule Dortmund\Bachelorarbeit\jmtool
10 silly lifecycle jmtool#1.0.0~start: Args: [ '/d /s /c', 'node built/index.js' ]
11 silly lifecycle jmtool#1.0.0~start: Returned: code: 1 signal: null
12 info lifecycle jmtool#1.0.0~start: Failed to exec start script
13 verbose stack Error: jmtool#1.0.0 start: `node built/index.js`
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 jmtool#1.0.0
15 verbose cwd C:\Users\Andi\OneDrive - Fachhochschule Dortmund\Bachelorarbeit\jmtool
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v10.15.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error jmtool#1.0.0 start: `node built/index.js`
22 error Exit status 1
23 error Failed at the jmtool#1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
And here's my package.json:
{
"name": "jmtool",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node built/index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"cheerio": "^1.0.0-rc.3",
"inquirer": "^7.3.2",
"inquirer-file-tree-selection-prompt": "^1.0.6",
"n-readlines": "^1.0.0",
"puppeteer": "^2.1.1",
"puppeteer-select": "^1.0.3",
"request": "^2.88.2"
},
"devDependencies": {
"#types/node": "^14.0.23"
}
}
Any ideas on how to fix this?
(I'm using Windows 10 64bit btw, in case that is relevant..)
I know the answer might be late, but I've just run into this issue. I think the problem is with the node version you're using. In my case, I was using node v12, changed the version to node v14.7.0 , and then I deleted node_modules rm -r node_modules, I run npm install, and then run npm start, and it worked for me.

Unable to run npm scripts via Azure pipeline says permission denied

I have followed the link to configure cypress test to Azure pipeline.
https://medium.com/#schathurangajayasinghe/ci-with-azure-in-cypress-af2bbb7a46c4
After installation of npm. I am unable to run cypress command defined in package.json.
Adding content from my package.json
"devDependencies": {
"cypress": "^4.6.0",
"cypress-multi-reporters": "^1.2.4",
"mocha-junit-reporter": "^1.23.3"
},
"scripts": {
"scripts": "./node_modules/.bin/cypress run",
"test": "npm run scripts",
"test1": "echo \"Error: no test specified\" && exit 1"
},
This is my cypress.json code:
"reporter": "mocha-junit-reporter",
"reporterOptions": {
"mochaFile": "cypress/reports/junit/test-results.[hash].xml",
"testsuitesTitle": false
}
Adding YML details
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://learn.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool#0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- script: |
sudo npm install
displayName: 'npm install'
- task: Npm#1
inputs:
command: 'custom'
customCommand: 'run test'
continueOnError: true
- task: PublishTestResults#2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '*.xml'
searchFolder: '$(System.DefaultWorkingDirectory)/cypress/reports/junit'
mergeTestResults: true
testRunTitle: 'Publish Test Results'
Below is the complete error details from pipeline job run
I am not able to find any solution for error
2020-05-26T04:34:15.9216045Z ##[section]Starting: Npm
2020-05-26T04:34:15.9225064Z ==============================================================================
2020-05-26T04:34:15.9225380Z Task : npm
2020-05-26T04:34:15.9225735Z Description : Install and publish npm packages, or run an npm command. Supports npmjs.com and authenticated registries like Azure Artifacts.
2020-05-26T04:34:15.9226103Z Version : 1.169.1
2020-05-26T04:34:15.9226316Z Author : Microsoft Corporation
2020-05-26T04:34:15.9226618Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/package/npm
2020-05-26T04:34:15.9226975Z ==============================================================================
2020-05-26T04:34:16.2629701Z SYSTEMVSSCONNECTION exists true
2020-05-26T04:34:16.9531740Z SYSTEMVSSCONNECTION exists true
2020-05-26T04:34:16.9545193Z [command]/opt/hostedtoolcache/node/12.16.3/x64/bin/npm --version
2020-05-26T04:34:17.2314792Z 6.14.4
2020-05-26T04:34:17.6413569Z [command]/opt/hostedtoolcache/node/12.16.3/x64/bin/npm config list
2020-05-26T04:34:17.8370814Z ; cli configs
2020-05-26T04:34:17.8371879Z metrics-registry = `enter code here`"https://registry.npmjs.org/"
2020-05-26T04:34:17.8372133Z scope = ""
2020-05-26T04:34:17.8372525Z user-agent = "npm/6.14.4 node/v12.16.3 linux x64"
2020-05-26T04:34:17.8372690Z
2020-05-26T04:34:17.8372821Z ; environment configs
2020-05-26T04:34:17.8373011Z userconfig = "/home/vsts/work/1/npm/41.npmrc"
2020-05-26T04:34:17.8373157Z
2020-05-26T04:34:17.8373370Z ; node bin location = /opt/hostedtoolcache/node/12.16.3/x64/bin/node
2020-05-26T04:34:17.8373651Z ; cwd = /home/vsts/work/1/s
2020-05-26T04:34:17.8373816Z ; HOME = /home/vsts
2020-05-26T04:34:17.8374186Z ; "npm config ls -l" to show all defaults.
2020-05-26T04:34:17.8374338Z
2020-05-26T04:34:17.8385945Z [command]/opt/hostedtoolcache/node/12.16.3/x64/bin/npm run test
2020-05-26T04:34:18.3150165Z
2020-05-26T04:34:18.3150845Z > cypresspipe#1.0.0 test /home/vsts/work/1/s
2020-05-26T04:34:18.3151403Z > npm run scripts
2020-05-26T04:34:18.3151620Z
2020-05-26T04:34:18.3151833Z
2020-05-26T04:34:18.3152121Z > cypresspipe#1.0.0 scripts /home/vsts/work/1/s
**2020-05-26T04:34:18.3152416Z > cypress run** this command is coming from package.json
2020-05-26T04:34:18.3152610Z
**2020-05-26T04:34:18.3204244Z sh: 1: cypress: Permission denied**
2020-05-26T04:34:18.3811970Z npm ERR! code ELIFECYCLE
2020-05-26T04:34:18.3812168Z npm ERR! errno 126
2020-05-26T04:34:18.3812371Z npm ERR! cypresspipe#1.0.0 scripts: `cypress run`
2020-05-26T04:34:18.3812992Z npm ERR! Exit status 126
2020-05-26T04:34:18.3813124Z npm ERR!
2020-05-26T04:34:18.3813477Z npm ERR! Failed at the cypresspipe#1.0.0 scripts script.
2020-05-26T04:34:18.3813789Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-05-26T04:34:18.3814045Z
2020-05-26T04:34:18.3814228Z npm ERR! A complete log of this run can be found in:
2020-05-26T04:34:18.3814731Z npm ERR! /home/vsts/.npm/_logs/2020-05-26T04_34_18_291Z-debug.log
2020-05-26T04:34:18.3814975Z npm ERR! code ELIFECYCLE
2020-05-26T04:34:18.3815122Z npm ERR! errno 126
2020-05-26T04:34:18.3815542Z npm ERR! cypresspipe#1.0.0 test: `npm run scripts`
2020-05-26T04:34:18.3816150Z npm ERR! Exit status 126
2020-05-26T04:34:18.3816287Z npm ERR!
2020-05-26T04:34:18.3816460Z npm ERR! Failed at the cypresspipe#1.0.0 test script.
2020-05-26T04:34:18.3816746Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-05-26T04:34:18.3816968Z
2020-05-26T04:34:18.3817147Z npm ERR! A complete log of this run can be found in:
2020-05-26T04:34:18.3817633Z npm ERR! /home/vsts/.npm/_logs/2020-05-26T04_34_18_306Z-debug.log
2020-05-26T04:34:18.3820304Z Found npm debug log, make sure the path matches with the one in npm's output: /home/vsts/.npm/_logs/2020-05-26T04_34_18_306Z-debug.log
2020-05-26T04:34:18.3820654Z 0 info it worked if it ends with ok
2020-05-26T04:34:18.3820827Z 1 verbose cli [
2020-05-26T04:34:18.3821175Z 1 verbose cli '/opt/hostedtoolcache/node/12.16.3/x64/bin/node',
2020-05-26T04:34:18.3821583Z 1 verbose cli '/opt/hostedtoolcache/node/12.16.3/x64/bin/npm',
2020-05-26T04:34:18.3822132Z 1 verbose cli 'run',
2020-05-26T04:34:18.3822409Z 1 verbose cli 'test'
2020-05-26T04:34:18.3822552Z 1 verbose cli ]
2020-05-26T04:34:18.3822689Z 2 info using npm#6.14.4
2020-05-26T04:34:18.3822857Z 3 info using node#v12.16.3
2020-05-26T04:34:18.3823190Z 4 verbose run-script [ 'pretest', 'test', 'posttest' ]
2020-05-26T04:34:18.3823447Z 5 info lifecycle cypresspipe#1.0.0~pretest: cypresspipe#1.0.0
2020-05-26T04:34:18.3823738Z 6 info lifecycle cypresspipe#1.0.0~test: cypresspipe#1.0.0
2020-05-26T04:34:18.3824434Z 7 verbose lifecycle cypresspipe#1.0.0~test: unsafe-perm in lifecycle true
2020-05-26T04:34:18.3826130Z 8 verbose lifecycle cypresspipe#1.0.0~test: PATH: /opt/hostedtoolcache/node/12.16.3/x64/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/vsts/work/1/s/node_modules/.bin:/opt/hostedtoolcache/node/12.16.3/x64/bin:/usr/share/rust/.cargo/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin
2020-05-26T04:34:18.3827060Z 9 verbose lifecycle cypresspipe#1.0.0~test: CWD: /home/vsts/work/1/s
2020-05-26T04:34:18.3827551Z 10 silly lifecycle cypresspipe#1.0.0~test: Args: [ '-c', 'npm run scripts' ]
2020-05-26T04:34:18.3827919Z 11 silly lifecycle cypresspipe#1.0.0~test: Returned: code: 126 signal: null
2020-05-26T04:34:18.3828247Z 12 info lifecycle cypresspipe#1.0.0~test: Failed to exec test script
2020-05-26T04:34:18.3828552Z 13 verbose stack Error: cypresspipe#1.0.0 test: `npm run scripts`
2020-05-26T04:34:18.3828807Z 13 verbose stack Exit status 126
2020-05-26T04:34:18.3829373Z 13 verbose stack at EventEmitter.<anonymous> (/opt/hostedtoolcache/node/12.16.3/x64/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
2020-05-26T04:34:18.3829960Z 13 verbose stack at EventEmitter.emit (events.js:310:20)
2020-05-26T04:34:18.3830814Z 13 verbose stack at ChildProcess.<anonymous> (/opt/hostedtoolcache/node/12.16.3/x64/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
2020-05-26T04:34:18.3831256Z 13 verbose stack at ChildProcess.emit (events.js:310:20)
2020-05-26T04:34:18.3831746Z 13 verbose stack at maybeClose (internal/child_process.js:1021:16)
2020-05-26T04:34:18.3832122Z 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
2020-05-26T04:34:18.3832414Z 14 verbose pkgid cypresspipe#1.0.0
2020-05-26T04:34:18.3832613Z 15 verbose cwd /home/vsts/work/1/s
2020-05-26T04:34:18.3833308Z 16 verbose Linux 5.3.0-1020-azure
2020-05-26T04:34:18.3833804Z 17 verbose argv "/opt/hostedtoolcache/node/12.16.3/x64/bin/node" "/opt/hostedtoolcache/node/12.16.3/x64/bin/npm" "run" "test"
2020-05-26T04:34:18.3834301Z 18 verbose node v12.16.3
2020-05-26T04:34:18.3834673Z 19 verbose npm v6.14.4
2020-05-26T04:34:18.3835103Z 20 error code ELIFECYCLE
2020-05-26T04:34:18.3835252Z 21 error errno 126
2020-05-26T04:34:18.3835458Z 22 error cypresspipe#1.0.0 test: `npm run scripts`
2020-05-26T04:34:18.3835783Z 22 error Exit status 126
2020-05-26T04:34:18.3835980Z 23 error Failed at the cypresspipe#1.0.0 test script.
2020-05-26T04:34:18.3836277Z 23 error This is probably not a problem with npm. There is likely additional logging output above.
2020-05-26T04:34:18.3836562Z 24 verbose exit [ 126, true ]
2020-05-26T04:34:18.3836682Z
2020-05-26T04:34:18.3870900Z ##[error]Error: Npm failed with return code: 126
2020-05-26T04:34:18.3885472Z ##[section]Finishing: Npm

Webpack issue with npm start script with logs

I have always problems with doing SAME stuff like in tuts but for them works fine, and for me is always issues. All is good configured but I've got errors
LOG:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using npm#5.6.0
3 info using node#v9.5.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle worldwide_ocean#1.0.0~prebuild: worldwide_ocean#1.0.0
6 info lifecycle worldwide_ocean#1.0.0~build: worldwide_ocean#1.0.0
7 verbose lifecycle worldwide_ocean#1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle worldwide_ocean#1.0.0~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/thetanadu/Dokumenty/codetemp/worldwide_ocean/node_modules/.bin:/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/thetanadu/Dokumenty/codetemp/worldwide_ocean/node_modules/.bin:/home/thetanadu/bin:/home/thetanadu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle worldwide_ocean#1.0.0~build: CWD: /home/thetanadu/Dokumenty/codetemp/worldwide_ocean
10 silly lifecycle worldwide_ocean#1.0.0~build: Args: [ '-c',
10 silly lifecycle 'webpack -d && webpack-dev-server -content-base src/ --inline --hot --port 1234' ]
11 silly lifecycle worldwide_ocean#1.0.0~build: Returned: code: 1 signal: null
12 info lifecycle worldwide_ocean#1.0.0~build: Failed to exec build script
13 verbose stack Error: worldwide_ocean#1.0.0 build: `webpack -d && webpack-dev-server -content-base src/ --inline --hot --port 1234`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack at EventEmitter.emit (events.js:160:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:160:13)
13 verbose stack at maybeClose (internal/child_process.js:943:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
14 verbose pkgid worldwide_ocean#1.0.0
15 verbose cwd /home/thetanadu/Dokumenty/codetemp/worldwide_ocean
16 verbose Linux 4.13.0-32-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
18 verbose node v9.5.0
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error worldwide_ocean#1.0.0 build: `webpack -d && webpack-dev-server -content-base src/ --inline --hot --port 1234`
22 error Exit status 1
23 error Failed at the worldwide_ocean#1.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
package.json #scripts
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "npm run build",
"build": "webpack -d && webpack-dev-server -content-base src/ --inline --hot --port 1234"
}
Commands are 1:1 and for him is compiling, but not for me, I tried to look over this log but for me it isn't say anything clear :/
It depends on your dev scripts. IF you are using the webpack-dev-server then you could try these commands in your packages.json:
"scripts": {
"start": "start npm run start:client",
"start:client": "webpack-dev-server"
...
},
the build command could be called in you CLI - webpack -p or without -p