npm hangs when called in Visual Studio prebuild events - npm

Why when running the commands below in the cmd (and the current directory being the root of my visual studio project), everything is okay :
npm install
webpack --config webpack.config.vendor.js
webpack
But when asking to run that in my ASP.NET Core 2.0 with Visual Studio 2017 it hangs on the first line (while it does not require any user input).When I am saying it hangs, it hangs for about 3-5min (after executing the last line using call), like doing literally.
I managed to get a bit further by using call on each of them (which is suggested by the MS documentation for calling .bat scripts):
call npm install
call webpack --config webpack.config.vendor.js
call webpack
For some reasons it works and hangs only on the last line.
When trying out something simple like echo there everything is fine, I don't really get what is wrong with the lines above.
[EDIT]
ALready checked that out npm hangs on any command
But my issue seems to be different since it can run cmd and PowerShell (but hangs whenever it is run in an ISE PowerShell tab...)

Related

NPM run dev successful in vscode but not terminal (contenlayer + Nextjs)

I am a bit at a loss on this one. Everything in my terminal (hyper) was working just fine the other day until I closed out of it. I came in to launch a Nextjs app I had been working on and now npm run dev just hangs up and doesn't actually start. The strange thing (to me) is that Visual Studio Code's integrated terminal seems to run just fine (and much quicker).
So far, the only packages I have added are contentlayer and next-contentlayer besides the default nextjs packages. Basically, contentlayer looks for md files (in a difined dir) and then generates an api for them. Strangely this seems to work everywhere else but in my actual standalone terminal.
Hyper.js:
Visual Studio code integrated terminal:
I have found that if I remove makeSource from the contentlayer.config.ts file, next dev will still run. At this point I could just use vscode, but I would really like to figure out the issue on all of this.

How to fix errors in Gridsome.js?

Problem Summary
So I'm trying to launch a new Gridsome project for local development. I've toyed with Gridsome in the past and had a great experience, so I decided to give it another shot.
This time around; however, when I run the gridsome create command, the system creates a new Gridsome site directory as expected but returns the following error message:
The instructions in this error message say to enter the newly-created site directory and run gridsome develop to start local development. However, after running cd my-gridsome-site and subsequently running gridsome develop, I then receive this error:
So far, I've tried running npm install --save from the site directory as well as yarn install, both to no avail. Thinking that this was possibly tied to my terminal, I switched from using the Zsh terminal to using the Bash terminal. This also did not work.
I'm at a loss here and could really use a hand.
Thank you for helping,
David
This seems to be an environment error. Gridsome requires Node.js (v8.3+) and recommends Yarn.
Make sure your Node.js version is v8.3+ and use only one package manager like Yarn.
to check node version: node -v
I had this same issue, but I resolved it after installing yarn and running the project with yarn instead of NPM. So you should try using yarn it will help,

Vue cli code not running ine the command prompt

Trying out vue cli for the first time and I can't get to open the code from the command-prompt line into my visual studio through the cd my-app code ., command, I can only access it through the vue ui interface but them my localhost page goes, and there is no way of debugging/checking the process of the project or at least I haven't found it yet, and before I install extensions etc I just want to make sure which one and to see if there is a way to be checking your progress as you do when building in the browser...
Waiting for suggestions and
thanks in advance

Visual Studio Code React Native suddenly won’t debug. "Error: Error while executing command (error code 101)"

Seemingly out of absolutely nowhere and for no apparent reason I’m getting this error in the Visual Studio Code output when trying to debug run iOS:
Error: Error while executing command
'/Users/blaa/node_modules/.bin/react-native run-ios --scheme Play-Dev
--no-packager --verbose': Error while executing command '/Users/blaa/blaa/node_modules/.bin/react-native run-ios --scheme
Play-Dev --no-packager --verbose' (error code 101)
This worked fine yesterday. It’s working if I switch to my develop branch, just not when I’m on my feature branch. Another developer can currently successfully VSC debug both branches.
Things I’ve tried:
Nuked yarnopods 10-20X
Nuked all yarnopod lock files 1X
Deleted Derived Data 2X
Mac Restart
VSC Restart 5-10X
Switch the VSC terminal to bash not zsh
Nuked sim 3X
$ yarn cache clean
$ echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p - that old chestnut
Apologized to the old Gods and the new for anything bad I ever said about Xcode
Branch switch back to develop - nuked yarnopods - VSC debugging IS working
Branch switch back to feature branch - nuked yarnopods - VSC debugging NOT WORKING with mystery error 0
Debugging using Xcode and React Native Debugger is working, although breakpoints stopped working a few months ago in RNDB, so that’s pretty much useless.
FIXED. Deleted the entire local repo. Cloned fresh from origin. Added the launch.json file again.
I was getting similar errors and found this fix:
If there are Flutter (and Dart) extensions in Visual Studio Code uninstall them.
Close Visual Studio Code, delete the .vscode folder and open Visual Studio Code again.
Configure the "Run and debug" panel again so you can run the app.

How to execute code when user uninstalls your VSCode Extension?

I read the entire visual studio code extensibility documentation and didn't find something like that. I wanna do a clean up, not when extension is deactivated but when it is uninstalled. I also try using the "uninstall" and "postUninstall" scripts fields from package.json but it didn't execute the scripts. Is this even possible?
This was just added in v1.21: Extension uninstall hook
If your extension has some clean ups to be done when it is uninstalled from VS Code, you can now do that by registering a node script to the uninstall hook vscode:uninstall under scripts section in extension's package.json.
{
"scripts": {
"vscode:uninstall": "node ./out/src/lifecycle"
}
}
This script gets executed when the extension is completely uninstalled from VS Code which is when VS Code is restarted (shutdown and start) after the extension is uninstalled.
Note: Only Node.js scripts are supported.