NPM execution problem "Couldn't find a debug log in the cache or working directory" in Azure pipeline - npm

When I tried to execute
NPM with command npx cypress run
it's displaying following error
2022-08-12T07:37:38.5420694Z ##[warning]Couldn't find a debug log in the cache or working directory
2022-08-12T07:37:38.5433010Z ##[error]Error: Npm failed with return code: 1
so can anyone please help me with how I can solve this problem
thank you

Based on your description and screenshot, it is shown that the main error message in the screenshot is "Unknown command: "npx" ". It means that the issue will occur when using "npm install" this task to run your pipeline, it is suggested that try using "Command Line" task and adding "npx" in "Script" to test again.

Related

What causes the npm error {errno: -4094, code: 'UNKNOWN', syscall: 'readlink'}?

I have been happily building a next.js app over the last couple days without error. Today I installed the firebase npm and suddenly I am getting a strange error when I try to run "npm run dev?
ready - started server on 0.0.0.0:3002, url: http://localhost:3002
[Error: UNKNOWN: unknown error, readlink 'C:\...\seo-site\.next\server\pages\_document.js'] {
errno: -4094,
code: 'UNKNOWN',
syscall: 'readlink',
path: 'C:\\...\\seo-site\\.next\\server\\pages\\_document.js'
}
Even if I uninstall firebase and roll the entire project back to a working build I still get the same error. If I try to run this "broken" build on another computer with the same version of node and npm it runs completely fine. I've tried running npm cache clean --force and npm install -g npm#latest --force several times without any luck.
I have noticed that as I change things I get the error with a different path. Sometimes it's \webpack-runtime.js sometimes its \errors.js and somethimes it's \pages\_document.js'
I cant find anything online or on stack overflow for an error matching this errno or syscall. Has anyone experienced this before or know what is causing this?
deleting the .next file and running npm run dev fixed the issue. I am not sure why this worked but I think it has something to do with next.js trying to use parts of a previous build when you make updates that are causing errors. deleting folder forces next to rebuild everything again.
I tried to go back directories from command line and then reentered into the workplace directory and tried npm run dev. Worked for me.
Right-click the project folder and from the menu choose "Open in integrated Terminal". Then try to run "npm run dev". If it still doesn't work, go back one folder with the command "cd .." and then go back again to the project folder with "cd project folder name". Try running "npm run dev". It worked for me on both occasions. Hope this helps.
Solved by restarting VS Code 🤔
Error occurred seemingly out of nowhere, when restarting the local server with 'npm run dev'. Just doing minor CSS changes to a component in the Nextjs project.

npm init results in package manager console stuck with "Press ^C at any time to quit."

When I try to type "npm init" in the package console manager it starts the process, but the console is stuck with the message: "Press ^C at any time to quit.". I can create my package.json file, and I am therefore completely stuck. When running the whole program I get the error: "The command "npm run build" exited with code 1.".
Error when running "npm init":
I know a lot of people had success with removing the package_lock.json filer and node_modules folder, but this solves nothing for me. Stuck for 10 hours now - can anyone help?

code deploy - COMMAND_EXECUTION_ERROR: Error while executing command: npm run build. Reason: exit status 2

Code Build is failing with the below error.
Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: npm run build. Reason: exit status 2
Please help me if anyone is aware of how to fix this issue.
Regards,
Sam.
If you are using TypeScript then your linting errors may cause this type of error. At least in my case it was the linting rules.

ReferenceError: Unknown plugin "babel-plugin-transform-builtin-extend"

I am trying to run exercises on exercism but I am getting this error ReferenceError: Unknown plugin "babel-plugin-transform-builtin-extend" whenever I am trying to run the test with npm install below is my package.json file and the error log. What do I need to do?
Thank you.
I was able to put the link on github gist
I ran this command npm i babel-plugin-transform-builtin-extend on the terminal and it solved my problem. Thanks all

Fail TeamCity build when angular-cli reports errors

I'm trying to configure team city to run angular 5 application build.
I have powershell step with this script (it's in the build step definition not separate file). npm run build runs ng build
npm install
npm run build
For some reason even if ng build fails team city build won't fail. Status code from npm run is not propagated back to powershell.
See below screen:
TeamCity Fails the build if got a status code != 0 or when got stderr.
You should add Failure Conditions for verifying that the log has an error.
Edit Configuration Settings -> Failure Conditions -> Add failure condition
Select Fail build on specific text in build log
Secelt options Contains and exact text. Set "npm ERR"
in Failure message write "Error was found in build log"
save
Now your build will be FAILED if build log contains this text.
Also, check an error message is logged by build runner