clickup / honey

Come to the sweet side of testing.
364 stars 15 forks source link

Tried running docs locally from command line. Seems like VuePress version has issues? #30

Open bkbonner opened 1 year ago

bkbonner commented 1 year ago

I tried using the docs/package.json as downloaded as:

{
    "name": "docs",
    "version": "1.0.0",
    "devDependencies": {
        "@types/node": "^18.11.9",
        "@vuepress/plugin-prismjs": "^2.0.0-beta.53",
        "@vuepress/plugin-shiki": "^2.0.0-beta.52",
        "vuepress": "^2.0.0-beta.53"
    },
    "scripts": {
        "dev": "vuepress dev docs",
        "build": "vuepress build docs"
    }
}

It gave an error about codec problem:

npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm ERR! code ETARGET
npm ERR! notarget No matching version found for vuepress-vite@2.0.0-beta.50-pre.1.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget 
npm ERR! notarget It was specified as a dependency of 'vuepress'
npm ERR! notarget 

Googling this, I upgraded to vuepress, prismjs, and shiki all to 2.0.0-beta.60, but this issue still remains:

npm ERR! notarget No matching version found for vuepress-vite@2.0.0-beta.50-pre.1.

Steps to recreate: cd docs npm install --cache /tmp/new-cache

Upon more searching this issue is caused by: https://github.com/vuepress/vuepress-next/issues/1195

Basically they updated to a newer version of a dependency with a naming that causes the ^ and ~ to fail.

I'd suggest just switching those out to:

{
    "name": "docs",
    "version": "1.0.0",
    "devDependencies": {
        "@types/node": "^18.11.9",
        "@vuepress/plugin-prismjs": "2.0.0-beta.60",
        "@vuepress/plugin-shiki": "2.0.0-beta.60",
        "vuepress": "2.0.0-beta.60"
    },
    "scripts": {
        "dev": "vuepress dev docs",
        "build": "vuepress build docs"
    }
}
bkbonner commented 1 year ago

Well, it installs OK, but it doesn't run. :(

$ npm run dev

> docs@1.0.0 dev /Users/bkbonner/Downloads/honey-main/docs
> vuepress dev docs

/Users/bkbonner/Downloads/honey-main/docs/node_modules/vuepress/bin/vuepress.js:3
import 'vuepress-vite/bin'
       ^^^^^^^^^^^^^^^^^^^

SyntaxError: Unexpected string
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! docs@1.0.0 dev: `vuepress dev docs`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the docs@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.