vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.75k stars 6.33k forks source link

starting "vue ui" - TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined #6786

Open ZombieBrand opened 2 years ago

ZombieBrand commented 2 years ago

Version

4.5.14

Environment info

  System:
    OS: macOS 11.6.1
    CPU: (8) arm64 Apple M1
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    Yarn: 1.22.17 - /opt/homebrew/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
  Browsers:
    Chrome: 95.0.4638.54
    Edge: 95.0.1020.30
    Firefox: Not Found
    Safari: 15.0
  npmPackages:
    @riophae/vue-treeselect: ^0.4.0 => 0.4.0
    @vue/babel-helper-vue-jsx-merge-props:  1.2.1
    @vue/babel-helper-vue-transform-on:  1.0.2
    @vue/babel-plugin-jsx:  1.1.1
    @vue/babel-plugin-transform-vue-jsx:  1.2.1
    @vue/babel-preset-app:  4.5.14
    @vue/babel-preset-jsx:  1.2.4
    @vue/babel-sugar-composition-api-inject-h:  1.2.1
    @vue/babel-sugar-composition-api-render-instance:  1.2.4
    @vue/babel-sugar-functional-vue:  1.2.2
    @vue/babel-sugar-inject-h:  1.2.2
    @vue/babel-sugar-v-model:  1.2.3
    @vue/babel-sugar-v-on:  1.2.3
    @vue/cli-overlay:  4.5.14
    @vue/cli-plugin-babel: ^4.5.14 => 4.5.14
    @vue/cli-plugin-eslint: ^4.5.14 => 4.5.14
    @vue/cli-plugin-router:  4.5.14
    @vue/cli-plugin-unit-jest: ^4.5.14 => 4.5.14
    @vue/cli-plugin-vuex:  4.5.14
    @vue/cli-service: ^4.5.14 => 4.5.14
    @vue/cli-shared-utils:  4.5.14
    @vue/component-compiler-utils:  3.2.0
    @vue/composition-api: ^1.2.4 => 1.2.4
    @vue/preload-webpack-plugin:  1.1.2
    @vue/test-utils: 1.0.0-beta.29 => 1.0.0-beta.29
    @vue/web-component-wrapper:  1.3.0
    babel-helper-vue-jsx-merge-props:  2.0.3
    eslint-plugin-vue: ^6.2.2 => 6.2.2
    jest-serializer-vue:  2.0.2
    typescript:  3.9.10
    vue: ^2.6.14 => 2.6.14
    vue-cli-plugin-webpack-bundle-analyzer: ^4.0.0 => 4.0.0
    vue-count-to: ^1.0.13 => 1.0.13
    vue-demi:  0.9.1
    vue-eslint-parser:  7.6.0 (2.0.3)
    vue-hot-reload-api:  2.3.4
    vue-jest:  3.0.7
    vue-loader:  15.9.7 (16.8.1)
    vue-monoplasty-slide-verify: ^1.1.3 => 1.1.3
    vue-router: ^3.5.3 => 3.5.3
    vue-style-loader:  4.1.3
    vue-template-compiler: ^2.6.14 => 2.6.14
    vue-template-es2015-compiler:  1.9.1
    vuex: ^3.6.2 => 3.6.2
    vuex-persistedstate: ^3.2.1 => 3.2.1
  npmGlobalPackages:
    @vue/cli: Not Found

What is actually happening?

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at new NodeError (node:internal/errors:371:5) at validateString (node:internal/validators:119:11) at Object.join (node:path:1172:7) at Object.readPackage (/Users/cheyongzhi/.config/yarn/global/node_modules/@vue/cli-ui/apollo-server/connectors/folders.js:131:24) at readPackage (/Users/cheyongzhi/.config/yarn/global/node_modules/@vue/cli-ui/apollo-server/connectors/dependencies.js:78:20) at getLink (/Users/cheyongzhi/.config/yarn/global/node_modules/@vue/cli-ui/apollo-server/connectors/dependencies.js:170:15) at /Users/cheyongzhi/.config/yarn/global/node_modules/@vue/cli-ui/apollo-server/connectors/dependencies.js:58:16 at Array.map () at findDependencies (/Users/cheyongzhi/.config/yarn/global/node_modules/@vue/cli-ui/apollo-server/connectors/dependencies.js:53:5) at Object.list (/Users/cheyongzhi/.config/yarn/global/node_modules/@vue/cli-ui/apollo-server/connectors/dependencies.js:36:5) { code: 'ERR_INVALID_ARG_TYPE' } (node:80985) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/cheyongzhi/Desktop/work/VUE_IFW/node_modules/vuex/package.json. Update this package.json to use a subpath pattern like "./*". (Use node --trace-deprecation ... to show where the warning was created)

jagoncalves14 commented 2 years ago

Having the same issue. Does anyone know a solution for this?

meschg commented 2 years ago

Hello, yes I am also currently having the same issue but not sure yet what the impact is and where it comes from.

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at new NodeError (node:internal/errors:371:5) at validateString (node:internal/validators:119:11) at Object.join (node:path:1172:7) at Object.readPackage (/usr/local/lib/node_modules/@vue/cli/node_modules/@vue/cli-ui/apollo-server/connectors/folders.js:131:24) at readPackage (/usr/local/lib/node_modules/@vue/cli/node_modules/@vue/cli-ui/apollo-server/connectors/dependencies.js:78:20) at getLink (/usr/local/lib/node_modules/@vue/cli/node_modules/@vue/cli-ui/apollo-server/connectors/dependencies.js:170:15) at /usr/local/lib/node_modules/@vue/cli/node_modules/@vue/cli-ui/apollo-server/connectors/dependencies.js:58:16 at Array.map () at findDependencies (/usr/local/lib/node_modules/@vue/cli/node_modules/@vue/cli-ui/apollo-server/connectors/dependencies.js:53:5) at Object.list (/usr/local/lib/node_modules/@vue/cli/node_modules/@vue/cli-ui/apollo-server/connectors/dependencies.js:36:5) { code: 'ERR_INVALID_ARG_TYPE' }

I am started to update my vue-vite-vuetify-ceisum-template (https://github.com/meschg/vue-stack-cesium) and the problem was related to sass in my project.

Removing "sass": 1.49.8 and the error seems to be gone.

Kind regards,

stevemandl commented 2 years ago

I am having the same issue when I run vue ui and then browse to 'project dependencies' in the ui.

jbogheand commented 2 years ago

Having the same issue

trusktr commented 2 years ago

Having this issue lately, but with "from" instead of "path" on an old project that always worked before. Output looks like this:

 ERROR  Failed to compile with 1 error                                                                                                                                                                                12:08:48 AM

 error  in ./src/LiveCode.vue?vue&type=template&id=a887fc58&

Syntax Error: Thread Loader (Worker 5)
The "from" argument must be of type string. Received undefined

 @ ./src/LiveCode.vue?vue&type=template&id=a887fc58& 1:0-525 1:0-525
 @ ./src/LiveCode.vue
 @ ./src/index.js
 @ ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js
trusktr commented 2 years ago

I solved my case by pinning all Vue build-related dependencies. Something had an in-range breaking change somewhere.

BryceBarbara commented 1 year ago

We had this issue as well and it was caused by race conditions with a "non-serializable" loader. In our case, it was sass-loader. It's always sass...