buefy / nuxt-buefy

Nuxt Buefy
MIT License
221 stars 33 forks source link

Fix:(Bug): GitHub Workflow Fails to Publish to `NPM` #138

Closed wesdevpro closed 11 months ago

wesdevpro commented 11 months ago

npm ERR! A complete log of this run can be found in: npm ERR! /home/runner/.npm/_logs/2023-10-02T18_1839136Z-debug-0.log Error: Process completed with exit code 1.

wesdevpro commented 11 months ago

Solution: run npm install to install all the required dependencies. Source: https://stackoverflow.com/questions/69984660/npm-ci-can-only-install-packages-with-an-existing-package-lock-json-or-npm-shrin

Problem Number 2

Multiple Dependency issues were found when running npm install on my local machine.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: nuxt-buefy@0.4.26
npm ERR! Found: eslint@5.16.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^5.5.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^3.19.0" from eslint-config-buefy@0.0.2
npm ERR! node_modules/eslint-config-buefy
npm ERR!   dev eslint-config-buefy@"^0.0.2" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

What are your thoughts @gmercey, and @kikuomax.

wesdevpro commented 11 months ago

Solution: run npm install to install all the required dependencies. Source: https://stackoverflow.com/questions/69984660/npm-ci-can-only-install-packages-with-an-existing-package-lock-json-or-npm-shrin

Problem Number 2

Multiple Dependency issues were found when running npm install on my local machine.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: nuxt-buefy@0.4.26
npm ERR! Found: eslint@5.16.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^5.5.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^3.19.0" from eslint-config-buefy@0.0.2
npm ERR! node_modules/eslint-config-buefy
npm ERR!   dev eslint-config-buefy@"^0.0.2" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

What are your thoughts @gmercey, and @kikuomax.

Note that there is a dependency eslint-config-buefy that has a newer version v0.0.3

image Note that this dependency is failing.

On line 32 of that projects package.json file the following dependency eslint^v4.18.2 is required as a peer dependency. However, in our own dependencies listed in the nuxt-buefy the dependency eslint^5.5.0 is listed as a DevDepednecy. Is it possible that these two dependencies are conflicting each other?

wesdevpro commented 11 months ago

image

wesdevpro commented 11 months ago

Looking at Buefy/Buefy's package.json you will see that the devDependency for eslint is v4.18.2 After seeing this information I chose to test if rolling back eslint in nuxt-buefy would at least fix the issue. The rollback did fix the issue. However, we may want to consider updating these repositories (i.e nuxt-buefy, eslint-config-buefy, etc.) as eslint is already up to 8.50.0 However we may be restricted to a specific version of eslint depending on what nuxt v2 allows. @kikuomax @gmercey

wesdevpro commented 11 months ago

Doing this just uncovered another error upon building and testing with Circle Ci

@gmercey @kikuomax please see https://github.com/buefy/nuxt-buefy/pull/139#issuecomment-1743803262

wesdevpro commented 11 months ago

A similar bug was just found @kikuomax 😢

Run npm ci
npm ERR! code EUSAGE
npm ERR! 
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR! 
npm ERR! Invalid: lock file's buffer@4.9.2 does not satisfy buffer@6.0.3
npm ERR! Missing: buffer@4.9.2 from lock file
npm ERR! 
npm ERR! Clean install a project
npm ERR! 
npm ERR! Usage:
npm ERR! npm ci
npm ERR! 
npm ERR! Options:
npm ERR! [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
npm ERR! [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
npm ERR! [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
npm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm ERR! 
npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
npm ERR! 
npm ERR! Run "npm help ci" for more info

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/[20](https://github.com/buefy/nuxt-buefy/actions/runs/6388687155/job/17338925831#step:4:21)[23](https://github.com/buefy/nuxt-buefy/actions/runs/6388687155/job/17338925831#step:4:24)-10-03T04_[30](https://github.com/buefy/nuxt-buefy/actions/runs/6388687155/job/17338925831#step:4:31)_55_798Z-debug-0.log
Error: Process completed with exit code 1.
wesdevpro commented 11 months ago

This issue was fixed by simply regenerating the package-lock.json file ✨