How to set up pnpm in run/debug in WebStorm - webstorm

I get the error for "Please specify npm or yarn package: cannot find binary file inside" after I try to set up the path of pnpm under Preferences -> Languages & Frameworks -> Node.js and NPM -> Package Management. From WebStorm doc, that is how I should set up.
Does anyone know how to use pnpm in WebStorm?

I solved the problem by installing, node and npm then pnpm as global under my Mac that I do not have before.
brew install node
npm i -g pnpm#x.x.x make sure x.x.x version matched the version of my project
Then go to use /usr/local/pin/pnpm under "Preferences" -> "Languages & Frameworks" -> "Node.js and NPM" -> "Package Management"
and under "Run/Debug Configuration" select the Project for Package Management not the directory of pnpm under my project. I guess for somereason Webstorm can not use pnpm under my project

Related

Unable to install arcpy module using Pycharm

I realize this has come up before, but all the responses I've found were for different versions of Arc.
I have followed the steps from this link and set my project interpreter to python c:\Python27\ArcGIS10.4\python.exe. Based from what i've read, that should be set up with Arcpy pre-installed. However, if I look at the packages in the VENV, arcpy isn't listed. I've tried adding it using pip and the pycharm GUI package manager. There isn't a package just named arcpy, the options are:
arcpy-metadata
arcpy-virtualenv
arcpyext
arcpylogger
I have successfully installed all of them and they show up in the package list of the project virtual environment. Despite this, I still get "no module named arcpy" as an error when I go to run a script.
Any ideas about where i'm going wrong?
Thanks for your help.
So I've spent a while looking over the issue and using Conda as your project Interpreter is the fix to your issue. I've tested it myself as well. Here are some clear instructions on how to correctly install Conda and set up the environment in Pycharm:
To create a Conda environment:
Ensure that Anaconda or Miniconda is downloaded and installed on your computer, and you're aware of a path to its executable file.
(Refer to the installation instructions for more details.)
Press Meta+Comma to open the project Settings/Preferences.
In the Settings/Preferences dialog Meta+Comma, select Project | Project Interpreter. Click the The Configure project interpreter icon and select Add.
In the left-hand pane of the Add Python Interpreter dialog, select Conda Environment.
The following actions depend on whether the Conda environment existed before.
If New environment is selected:
Specify the location of the new Conda environment in the text field, or click Conda environment location and find location in your file system. Note that the directory where the new Conda environment should be located, must be empty!
Select the Python version from the list.
Specify the location of the Conda executable file in the text field, or click Conda executable location and find location in the Conda installation directory. You're basically looking for a path that you've used when installing Conda on your machine.
Select the Make available to all projects checkbox, if needed.
If Existing environment is selected:
Expand the Interpreter list and select any of the existing interpreters. Alternatively, click Select an interpreter and specify a path to the Conda executable in your file system, for example, C:\Users\jetbrains\Anaconda3\python.exe.
Select the checkbox Make available to all projects, if needed.
Click OK to complete the task.

Package Amazon.Lambda.Tools 3.0.1 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1).

I have installed dotnet tool.
install --global Amazon.Lambda.Tools --version 3.0.1 and trying to use in the .net core project 2.1. I am getting this error on setting the project file.
<ItemGroup>
<DotNetCliToolReference Include="Amazon.Lambda.Tools" Version="3.0.1" />
</ItemGroup>
but I am getting this error.
Package Amazon.Lambda.Tools 3.0.1 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Amazon.Lambda.Tools 3.0.1 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1)
Help??
The the info on the usage here: https://github.com/aws/aws-extensions-for-dotnet-cli
Basically you will need to remove this from the project file:
<-- This line needs to be removed -->
<DotNetCliToolReference Include="Amazon.Lambda.Tools" Version="X.X.X" />
and the tools will need to be installed the following way moving forward:
dotnet tool install -g Amazon.Lambda.Tools
In late 2019, the tool got moved as a global one, instead of being installed locally within the project, it is installed at a machine level.
Go to package manager console in VS, give the command as below:-
dotnet tool install -g Amazon.Lambda.Tools
If its an older project being migrated to newer version, in the project file, the DotNetCliToolReference line needs to be removed.
Now the project file has an entry which marks the project as a Lambda function as follows, if not present then this needs to be added manually in the main property group.
<AWSProjectType>Lambda</AWSProjectType>
Ref: https://github.com/aws/aws-extensions-for-dotnet-cli
While the answer above will install the tools locally, you may also need to make sure your csproj includes the AWSProject type. See my answer to this post https://stackoverflow.com/a/55712772/407188.
in my case by installing Version 3.3.1 AWS SDK work for me
Install-Package AWSSDK.Extensions.NETCore.Setup -Version 3.3.1
or look the appropriate version on this link
https://www.nuget.org/packages/AWSSDK.Extensions.NETCore.Setup/3.3.1

Install specific version of Cordova CLI in Visual Studio 2017

I need to do some updates to a Cordova app created using Visual Studio 2017 Tools for Apache Cordova (TACO).
The Cordova CLI version listed in the config.xml file is 6.3.1 and the cordova-ios platform version is 4.2.0
When I try to build the project (using a Mac with XCode 8.3.3, I get this error
Build failed with error Remotebuild requires your projects to use
cordova-ios 4.3.0 or greater with XCode 8.3. Please update your
cordova-ios version.
I don't see any updates to TACO in VS2017 or instructions in the Microsoft documentation for Apache Cordova Tools.
Ideally, I'd like to make the most minor version update possible to get my build working with XCode 8.3.3.
I know there is a Cordova version 7.0.1, but I don't want to make that upgrade just yet because I'm under the gun time wise.
I don't see any updates to TACO in VS2017 or instructions in the Microsoft documentation for Apache Cordova Tools.
You can follow below steps to use the latest cordova-ios:
Open config.xml with designer
Toolset->Check the checkbox of Take latest patch(requires internet) on cordova-ios row.
Update:
If you don't see the checkbox in the designer page, you need to change it in the xml. Find the following tag in config.xml:
<engine name="ios" spec="4.2.0" />
and modify it to:
<engine name="ios" spec="~4.2.0" />
Update2:
If the version is still not update to the latest, please try the below steps to fix the issue:
Clear the cordova cache under: Tools->Options->Tools for Apache Cordova->Clear Cordova cache.
Open cmd of your project folder;
Type npm install -g cordova-ios to install globally the cordova-ios(requires node installed as pre-work);
Then cordova platform rm ios;
Type cordova platform add ios;
Run your project again
For iOS, please install iOS#4.3.1. This is the only version i found working with XCode 8.3.3
I had the same error, follow this steps :
1- If not installed yet, install Node
2- Install the latest version of cordova or anyother:
npm install -g cordova
3- Install taco-cli:
npm install -g taco-cli
4- Configure taco-cli :
taco remote add ios
(respond a few question, MAC IP, Port,etc...)
5- in your root project add or edit a file named "taco.json", add inside :
{
"cordova-cli": "7.1.0"
}
Where 7.1.0 correspond to your cordova version (cordova --v)
6- Try to emulate on your MAC:
taco emulate ios
You will maybe have an error about platform. Ignore it
7- Close then open Visual Studio
8- On Visual Studio open the config.xml UI EDITOR and change the toolset name with
Global cordova
9- Build using Visual Studio.
If it doesn't work, please let me know
I don't have the authority to add a comment to the answer above, so adding my updates here:
If the version is still not update to the latest, please try the below steps to fix the issue:
First, modify your project config.xml file using an editor, rather than through the tools. Not sure why it was necessary, but this was the key difference from the above instructions. I also found that 4.3.1 was best. Remove any ~ characters before the version.
Then:
Clear the cordova cache under: Tools->Options->Tools for Apache Cordova->Clear Cordova cache.
Open cmd of your project folder
Type npm install -g cordova-ios to install globally the cordova-ios(requires node installed as pre-work)
Then cordova platform rm ios
Type cordova platform add ios
Run your project again
If the cordova command in steps 4 and 5 doesn't work, add the cordova bin directory to you path. In my case
C:\ProgramData\Microsoft\VisualStudio\MDA\ad0a0856\taco-toolset-6.3.1\node_modules.bin\

Environment variable issue in build an apk in ionic project

I am trying to build an apk in ionic 2 but while building is getting following error.
Error:
Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.
After that, I set the environment variable and path. Even though still am getting that error again can anyone please help me how to solve this issue
Instruction 1:
After adding your ANDROID_HOME, make sure you do the below:
Restart your System or run source ~/.bash_profile
Remove Android platform from your project ionic cordova platform rm android or ionic platform rm android
Add Android platform ionic cordova platform add android
Then ionic cordova run android or ionic run android
Instruction 2:
To set your ANDROID_HOME and JAVA_HOME, follow the below steps:
Run command open ~/.bash_profile
Paste the below in the file that opens on your Text editor
export ANDROID_HOME=/usr/local/Cellar/android-sdk/24.4.1_1
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Save - "Command S" or "Ctrl S"
Then Follow the "Instruction 1:" above
NOTE: Make sure you have 24.4.1_1 SDK
Hope this helps.

ESLint in WebStorm

Has anybody encountered the problem ESLint not loading in WebStorm? I'm trying to specify a path /usr/local/bin/eslint, /usr/local/bin,
Every time I got this message:
or no such directory message.
You need to point that field to the actual ESLint script. This would usually be the place where you've installed the ESLint npm package or command-line tool.
OS X El Capitan
I've installed npm & node with brew. It's easy to keep stuff up to date with brew.
brew install node
then installed eslint globally with npm
npm i eslint -g
and here is my working config:
/usr/local/bin/node /usr/local/lib/node_modules/eslint
I add .eslintrc file with eslint rules in project's root folder.
Try using those drop-downs next to input field, webstorm gives path w/o any typing.
Following are the steps you need to get it working on Windows 10:
Open command prompt and navigate to your project root.
Run the following command:
npm install eslint --save-dev
Once ESLint finishes installing in the above step, navigate through the following menus in Webstorm:
File > Settings.... Click on Settings...
In the Settings screen that shows up, in the top-left hand corner, there is a Search box. Type eslint in it.
That will show you the 'ESLint' settings for this project. Now tick the checkbox that says "Enable". Make sure that the Node interpreter: has the right value. In my case, it was C:\Program Files\nodejs\node.exe
Just below the Node interpreter: setting, there is a setting called ESLint package:. If you have correctly installed the ESLint package as I mentioned in Step 2 above, this setting will be auto-populated to show the current path of ESLint package from your project's node_modules folder. In my case, the value of this setting was:
D:\www\gdp\node_modules\eslint (gdp is my project root folder)
Click on Apply and OK buttons respectively.
Restart Webstorm. If you have successfully completed all the steps, you will not see the prompt to enter the ESLint again.
Enjoy!!!