Author Topic: Initial setup error  (Read 563 times)

Maino

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 25
    • View Profile
Initial setup error
« on: February 13, 2024, 02:18:58 pm »
Work environment is vue.js. Error during initial setup. The "pqgrid": "file:/src/components/pqGrid" path was dependent on the package.json file. There are folders decompressed in the path '.src/components/pqGrid.When you do the initial setting and run the source, an error as shown in the figure occurs. What should I do??

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6203
    • View Profile
Re: Initial setup error
« Reply #1 on: February 13, 2024, 02:33:36 pm »
Maino

Is it possible for you to share project files which can help reproduce and check error, as an attachment.

EDIT -----------

Please try replacing

Code: [Select]
module.exports = pq; 

with

Code: [Select]
export default pq;

in pqgrid js file.

 
Regards
« Last Edit: February 13, 2024, 04:27:45 pm by paramvir »

Maino

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Initial setup error
« Reply #2 on: February 14, 2024, 06:04:31 am »
The pqgrid.min.js file is a file that has been downloaded and decompressed since version 9.1.1. The index.js file contains module.exports = pq, the index.js file contains module.exports = pq, and the index.js file is coded as module.exports require ('/pqgrid.min.js'). The package.json file is a file that has been downloaded and decompressed since version 9.1.1., pq confirmed that the import is good.(import pq from 'pqgrid';)

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6203
    • View Profile
Re: Initial setup error
« Reply #3 on: February 14, 2024, 07:34:39 am »
Is the error resolved or are you still facing the same error.

Maino

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Initial setup error
« Reply #4 on: February 14, 2024, 07:43:05 am »
Currently in package.json of pqgrid, 'jszip' is using "2.5.0", can I use version 3.1.5?? when I npm install, The warning "npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself" occurred. And jszip and pako are downloaded at npm install in the current "C:\pqGrid\FRONTEND\node_modules\pqgrid\node_modules" path.
« Last Edit: February 14, 2024, 07:55:31 am by Maino »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6203
    • View Profile
Re: Initial setup error
« Reply #5 on: February 14, 2024, 08:11:15 am »
pqgrid works only with jszip v2.5.0, there are breaking changes between jszip v2.5.0 and v3.1.5

Maino

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Initial setup error
« Reply #6 on: February 14, 2024, 08:14:31 am »
I lowered the jszip version to 2.5.0 and installed pako to the 0.2.9 version, but an error occurred as shown in the picture.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6203
    • View Profile
Re: Initial setup error
« Reply #7 on: February 14, 2024, 08:39:13 am »
Please mention something about the setup of your project, the version of Vue.js and if there is tsconfig.js file in your project?
« Last Edit: February 14, 2024, 08:54:29 am by paramvir »

Maino

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Initial setup error
« Reply #8 on: February 14, 2024, 09:52:45 am »
The project settings file and tsconfig file.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6203
    • View Profile
Re: Initial setup error
« Reply #9 on: February 14, 2024, 11:54:25 am »
Thanks for sharing project info. Please use

Code: [Select]
    "module": "esnext",
    "target": "es2015",

in tsconfig.json file.

Maino

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Initial setup error
« Reply #10 on: February 14, 2024, 01:03:15 pm »
{
  "compilerOptions": {
    "module": "esnext",
    "target": "es2015",
    "forceConsistentCasingInFileNames": false
  }
}
tsconfig.json source

When I changed the source, I got an error like the picture, and when the source runs, I keep getting an error like the 1.png I asked today...

And should I use tsconfig? Originally, there was no tsconfig, but when I added it, I got a phrase like scriptError.png.
« Last Edit: February 14, 2024, 01:46:14 pm by Maino »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6203
    • View Profile
Re: Initial setup error
« Reply #11 on: February 14, 2024, 02:17:40 pm »
There are easy to folllow steps to create pqgrid seed project in vue.js here: https://paramquery.com/pro/tutorial#topic-firstvue. If these steps are followed then no errors are encountered and tsconfig.json file is not created.


You can download the sample Vue.js project with pqgrid created using @vue/cli here: https://paramquery.com/Content/vue-hello-world.zip
« Last Edit: February 14, 2024, 10:13:13 pm by paramvir »

Maino

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Initial setup error
« Reply #12 on: February 15, 2024, 06:26:48 am »
I keep getting errors like 3.png from the first question.... pggridSetting has files that have been unlocked from the grid attachment. And tsconfig.json deleted.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6203
    • View Profile
Re: Initial setup error
« Reply #13 on: February 15, 2024, 07:59:21 am »
As mentioned in my previous post, please use recommended tool like @vue/cli to create your project to get rid of the errors.
You can download the sample Vue.js project with pqgrid created using @vue/cli here: https://paramquery.com/Content/vue-hello-world.zip

It doesn't make any difference whether the pqgrid is used remotely from npm or used as local module as far as the errors are concerned.

Individual files shared by you don't help in reproducing the errors, there could be some issue in the setup of your project. Please share your entire project without the node_modules folder.