Author Topic: How to apply licenses when using npm packages  (Read 3344 times)

juroinstruments

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 17
    • View Profile
How to apply licenses when using npm packages
« on: September 22, 2025, 10:29:47 am »
Hello.

I've been developing using the web browser version, but I'm trying to develop using npm.
When I run npm install, it says "Pro Trial." So, when I check, I see the following section, but I don't understand it.

I want to know how to properly apply the license I purchased.
Also, if you have any tutorials or links for developing with TypeScript, please let me know.

"Commercial or OEM versions of pqgrid can be installed as a local npm package by pointing "pqgrid" to the local file system path in the package.json file -> dependencies section in the project manually."

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6552
    • View Profile
Re: How to apply licenses when using npm packages
« Reply #1 on: September 22, 2025, 02:03:04 pm »
Following are the tutorials for development with local npm and TypeScript:

https://paramquery.com/pro/tutorial#topic-npm

https://paramquery.com/pro/tutorial#topic-typescript

When you use the local npm package of pqGrid, you don’t need to apply the license separately. The license is already included with the package you downloaded after purchase.

juroinstruments

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: How to apply licenses when using npm packages
« Reply #2 on: September 23, 2025, 07:19:18 pm »
I'm sorry. I don't understand what you're saying below.

"Commercial or OEM versions of pqgrid can be installed as a local npm package by pointing "pqgrid" to the local file system path in the package.json file -> dependencies section in the project manually."


I understand that compressed files use script tags to attach them to the global window or jQuery, allowing the browser to reference them directly.

With npm, I know that if you type "npm i pqgrid," it installs from the npm package site and displays a "Pro Trial" message.

I don't know how to do this.
Can you explain it more clearly?
I don't understand.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6552
    • View Profile
Re: How to apply licenses when using npm packages
« Reply #3 on: September 23, 2025, 09:01:52 pm »
Here is a step-by-step explanation.

Step 1: Get the Commercial Files
Download the ZIP file (e.g., paramquery-pro.zip). Unzip this file into a folder inside your project. A good place might be a vendor/ folder.

Example project structure after unzipping:

text
my-project/
├── node_modules/
├── vendor/
│   └── paramquery-pro/   <-- Your purchased, commercial code is here
│       ├── paramquery files
│       ├── other files/folders
│       ├── package.json  <-- This is important!
│       └── ...
├── src/
├── package.json          <-- Your project's main package.json
└── ...

Step 2: Modify Your Project's package.json
In your project's main package.json file, you will change the pqgrid dependency. Instead of pointing to the public npm registry, you will point it to the local folder you just created.

Find the dependencies section in your package.json and change this:

json
"dependencies": {
  "pqgrid": "^x.x.x" // This gets the TRIAL version from npm
}
To this (using the correct relative path):

json
"dependencies": {
  "pqgrid": "file:./vendor/paramquery-pro" // This gets your COMMERCIAL version from the local folder
}
The file: prefix tells npm: "Don't go online to get this package. Look for it on my own computer, in this specific folder."

Step 3: Reinstall the Dependency
Now, you need to tell npm to uninstall the old (trial) version and install the new (commercial) version from your local folder.

In your terminal, navigate to your project's root directory (where your package.json is) and run:

npm install
or

npm update pqgrid

This command will read the "file:./vendor/paramquery-pro" path from your package.json, find the local folder, and link it into your node_modules folder.

juroinstruments

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: How to apply licenses when using npm packages
« Reply #4 on: September 24, 2025, 10:12:48 am »

Thank you.

I used to develop exclusively for browsers, but I switched to npm. I only knew how to install with npm, not how to use local files. Thank you for the detailed explanation.