hellooops / vscode-edi-support

Format, highlighting, hover supports for X12 and EDIFACT in vscode.
MIT License
11 stars 6 forks source link

Build error #7

Open 2br-2b opened 1 day ago

2br-2b commented 1 day ago

Hello! Thank you so much for making this open source extension!

I tried building the extension myself and got this error:

$ npm run buildPreview && vsce package

> jma-edi-edifact-support@1.4.3 buildPreview
> cd packages/edi-preview && npm run build

> edi-preview@0.0.0 build
> run-p type-check "build-only {@}" --

sh: 1: run-p: not found

There seem to be a few dependencies missing:

When I tried installing them, I got:

$ npm i npm-run-all
(...)
$ npm i vue-tsc vite

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: vite@5.4.9
npm error Found: @types/node@16.18.29
npm error node_modules/@types/node
npm error   @types/node@"*" from @types/glob@8.1.0
npm error   node_modules/@types/glob
npm error     dev @types/glob@"^8.1.0" from the root project
npm error   dev @types/node@"16.x" from the root project
npm error
npm error Could not resolve dependency:
npm error peerOptional @types/node@"^18.0.0 || >=20.0.0" from vite@5.4.9
npm error node_modules/vite
npm error   vite@"*" from the root project
npm error
npm error Conflicting peer dependency: @types/node@22.7.7
npm error node_modules/@types/node
npm error   peerOptional @types/node@"^18.0.0 || >=20.0.0" from vite@5.4.9
npm error   node_modules/vite
npm error     vite@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /home/foo/.npm/_logs/2024-10-21T13_35_33_066Z-eresolve-report.txt
npm error A complete log of this run can be found in: /home/foo/.npm/_logs/2024-10-21T13_35_33_066Z-debug-0.log
2br-2b commented 1 day ago

There seem to be a number of other packages missing. Among others:

Again, thank you so much for making this extension!

hellooops commented 10 hours ago

You might forget to install the dependencies of packages/edi-preview.

$ cd ./packages/edi-preview
$ npm i
$ cd ../..
$ npm i
$ npm run package

Then you can install the edi-edifact-support-xxx.vsix to vscode.

2br-2b commented 4 hours ago

You're right - this worked for me! I also had to install the vsce package from in the subdirectory, but by installing all packages from /packages/edi-preview, I was able to build the project!

When I went back and tried to npm i from the root directory, however, I got this error:

``` 'Log files: /home/foo/.npm/_logs/2024-10-22T13_05_11_873Z-debug-0.log # npm resolution error report While resolving: vite@5.4.9 Found: @types/node@16.18.114 node_modules/@types/node dev @types/node@"16.x" from the root project @types/node@"*" from @types/glob@8.1.0 node_modules/@types/glob dev @types/glob@"^8.1.0" from the root project Could not resolve dependency: peerOptional @types/node@"^18.0.0 || >=20.0.0" from vite@5.4.9 node_modules/vite vite@"^5.4.9" from the root project peer vite@"^5.0.0" from @vitejs/plugin-vue@5.1.4 node_modules/@vitejs/plugin-vue @vitejs/plugin-vue@"^5.1.4" from the root project Conflicting peer dependency: @types/node@22.7.8 node_modules/@types/node peerOptional @types/node@"^18.0.0 || >=20.0.0" from vite@5.4.9 node_modules/vite vite@"^5.4.9" from the root project peer vite@"^5.0.0" from @vitejs/plugin-vue@5.1.4 node_modules/@vitejs/plugin-vue @vitejs/plugin-vue@"^5.1.4" from the root project Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution. ```

I also attached the log file generated: 2024-10-22T13_05_11_873Z-debug-0.log

As a note, however, I was able to build the project without running npm i from the root directory