vuetifyjs / vuetify

🐉 Vue Component Framework
https://vuetifyjs.com
MIT License
39.32k stars 6.93k forks source link

[Bug Report][3.1.4] Contributing Error #16653

Closed MisterIsaak closed 1 year ago

MisterIsaak commented 1 year ago

Environment

Vuetify Version: 3.1.4 Vue Version: 3.2.47 Browsers: Edge 110.0.1587.41 OS: Windows 10

Steps to reproduce

https://next.vuetifyjs.com/en/getting-started/contributing/#local-development

Expected Behavior

No errors

Actual Behavior

Errors

Reproduction Link

https://gist.github.com/MisterIsaak/377a7985392e6e5568b38a92a96ad90f

Other comments

c:\repos\vuetify>node --version v18.14.0

c:\repos\vuetify>npm --version 9.4.2

c:\repos\vuetify>yarn --version 1.19.0

KaelWD commented 1 year ago

Can you add console.log(outPath) here and run yarn build api

MisterIsaak commented 1 year ago

https://gist.github.com/MisterIsaak/377a7985392e6e5568b38a92a96ad90f outPath /c:/repos/vuetify/packages/docs/src/api/data/

KaelWD commented 1 year ago

Does node -e "fs.mkdirSync('/c:/repos/vuetify/packages/docs/src/api/data/', { recursive: true })" fail too?

MisterIsaak commented 1 year ago

Yes sir. If I remove the leading "/", it seems happier.

c:\repos\vuetify>node -e "fs.mkdirSync('/c:/repos/vuetify/packages/docs/src/api/data/', { recursive: true })"
node:internal/fs/utils:347
    throw err;
    ^

Error: ENOENT: no such file or directory, mkdir '/c:/repos/vuetify/packages/docs/src/api/data/'
←[90m    at Object.mkdirSync (node:fs:1395:3)←[39m
    at [eval]:1:4
←[90m    at Script.runInThisContext (node:vm:129:12)←[39m
←[90m    at Object.runInThisContext (node:vm:307:38)←[39m
←[90m    at node:internal/process/execution:79:19←[39m
    at [eval]-wrapper:6:22
←[90m    at evalScript (node:internal/process/execution:78:60)←[39m
←[90m    at node:internal/main/eval_string:28:3←[39m {
  errno: ←[33m-4058←[39m,
  syscall: ←[32m'mkdir'←[39m,
  code: ←[32m'ENOENT'←[39m,
  path: ←[32m'/c:/repos/vuetify/packages/docs/src/api/data/'←[39m
}

Node.js v18.14.0

c:\repos\vuetify>node -e "fs.mkdirSync('/c:/repos/vuetify/packages/docs/src/api/data', { recursive: true })"
node:internal/fs/utils:347
    throw err;
    ^

Error: ENOENT: no such file or directory, mkdir '/c:/repos/vuetify/packages/docs/src/api/data'
←[90m    at Object.mkdirSync (node:fs:1395:3)←[39m
    at [eval]:1:4
←[90m    at Script.runInThisContext (node:vm:129:12)←[39m
←[90m    at Object.runInThisContext (node:vm:307:38)←[39m
←[90m    at node:internal/process/execution:79:19←[39m
    at [eval]-wrapper:6:22
←[90m    at evalScript (node:internal/process/execution:78:60)←[39m
←[90m    at node:internal/main/eval_string:28:3←[39m {
  errno: ←[33m-4058←[39m,
  syscall: ←[32m'mkdir'←[39m,
  code: ←[32m'ENOENT'←[39m,
  path: ←[32m'/c:/repos/vuetify/packages/docs/src/api/data'←[39m
}

Node.js v18.14.0

c:\repos\vuetify>node -e "fs.mkdirSync('c:/repos/vuetify/packages/docs/src/api/data/', { recursive: true })"

c:\repos\vuetify>
jacekkarczmarczyk commented 1 year ago

shell might matter (powershell, cmd, gitbash, cygwin, ...)

MisterIsaak commented 1 year ago

Good thinking. I was using cmd prompt. I just tried git bash, similar results though.

...
@vuetify/api-generator: $ yarn pre-build && yarn start
@vuetify/api-generator: $ babel src --out-dir lib --source-maps --extensions ".ts" --out-file-extension .mjs
@vuetify/api-generator: Successfully compiled 8 files with Babel (420ms).
@vuetify/api-generator: $ node --no-warnings lib/index.mjs
@vuetify/api-generator: outPath /C:/repos/vuetify/packages/docs/src/api/data/
@vuetify/api-generator: VAlertTitle
@vuetify/api-generator: VApp
@vuetify/api-generator: VAlert
@vuetify/api-generator: VAppBarTitle
@vuetify/api-generator: VAppBarNavIcon
@vuetify/api-generator: VAppBar
@vuetify/api-generator: Cannot find module 'C:\repos\vuetify\packages\api-generator\src\locale\en\v-alert-title.json'
@vuetify/api-generator: Cannot find module 'C:\repos\vuetify\packages\api-generator\src\locale\en\v-alert-title.json'
@vuetify/api-generator: VAlertTitle: Error: Illegal characters in path. Error: Illegal characters in path.
@vuetify/api-generator:     at pathArg (C:\repos\vuetify\node_modules\mkdirp\lib\path-arg.js:20:27)...
Reidemption commented 1 year ago

Has there been any progress on this ticket? I am wanting to contribute and I got something similar when running yarn build. I am using git-bash https://gist.github.com/Reidemption/5286199ba3ef54c17a1c9863ce931fc4

johnleider commented 1 year ago

Maybe related, maybe not, but I pushed up the missing files the generator is complaining about 626284d99

MisterIsaak commented 1 year ago

yarn run v1.19.0
$ node scripts/build.js
$ C:\repos\vuetify\node_modules\.bin\lerna run build --stream
lerna notice cli v3.22.1
lerna info Executing command in 3 packages: "yarn run build"
vuetify: $ rimraf lib dist && concurrently "yarn build:dist" "yarn build:lib" -n "dist,lib" --kill-others-on-fail -r && yarn build:types
vuetify: $ rollup --config build/rollup.config.js
vuetify: $ cross-env NODE_ENV=lib babel src --out-dir lib --source-maps --extensions ".ts",".tsx",".snap" --copy-files --no-copy-ignored --out-file-extension .mjs
vuetify: 
vuetify: src/entry-bundler.ts → dist/vuetify.esm.js, dist/vuetify.js, dist/vuetify.min.js...
vuetify: Successfully compiled 447 files with Babel (5972ms).
vuetify: (!) Circular dependencies
vuetify: src/util/index.ts -> src/util/createSimpleFunctional.ts -> src/util/defineComponent.tsx -> src/composables/defaults.ts -> src/util/index.ts
vuetify: src/composables/icons.tsx -> src/iconsets/mdi.ts -> src/composables/icons.tsx
vuetify: created dist/vuetify.esm.js, dist/vuetify.js, dist/vuetify.min.js in 20.2s
vuetify:
Attrs | undefined; bodyAttrs?: HeadAttrs | undefined; }>'.
vuetify:   Type '{ style: { children: string; id: string; nonce: string; }[]; }' is missing the following properties from type 'Ref<{ title?: string | undefined; meta?: HeadAttrs[] | undefined; link?: HeadAttrs[] | undefined; base?: HeadAttrs | undefined; style?: HeadAttrs[] | undefined; script?: HeadAttrs[] | undefined; htmlAttrs?: HeadAttrs | undefined; bodyAttrs?: HeadAttrs | undefined; }>': value, [RefSymbol]
vuetify: 320           head.addHeadObjs(getHead())
vuetify:                                ~~~~~~~~~
vuetify: Found 3 errors in the same file, starting at: src/composables/theme.ts:312
vuetify: error Command failed with exit code 2.
vuetify: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
vuetify: error Command failed with exit code 2.
vuetify: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build exited 2 in 'vuetify'
error Command failed with exit code 2.info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.PS C:\repos\vuetify>```
KaelWD commented 1 year ago

@MisterIsaak run yarn, you have outdated dependencies

@Reidemption you're using an outdated version of node.js

KaelWD commented 1 year ago

@johnleider not related, and those warnings aren't a bug in api-gen or just caused by missing files