Skip to content

Unable to resolve path to module '@/components/HelloWorld.vue' on vue ui #1650

Closed
@ruanltbg

Description

@ruanltbg

Version

3.0.0-rc.3

Reproduction link

https://github.com/ruanltbg/vue-ui-bug

Steps to reproduce

On terminal run:
$ vue ui

On the browser

  • Create new project
  • Fills the form with:
  • Package manager => npm
  • Overwrite target folder => true
  • Initialize git => true
  • Message => First commit
  • Next
  • Presenter => Manual
  • Next
  • Babel => true
  • PWA => true
  • Router => true
  • Vuex => true
  • CSS processor => true
  • Linter => true
  • Unit test => true
  • Config files => true
  • Next
  • CSS processor => SCSS/SASS
  • Linter => Airbnb
  • Lint to save => true
  • Unit test => mocha
  • Next
  • Continue without saving

What is expected?

To create a project successfully

What is actually happening?

$ vue ui
🚀  Starting GUI...
🌠  Ready on http://localhost:8000


Vue CLI v3.0.0-rc.3
✨  Creating project in /Users/ruan/workspace/projects/another-project.
🗃  Initializing git repository...
⚙  Installing CLI plugins. This might take a while...


> [email protected] install /Users/ruan/workspace/projects/another-project/node_modules/fsevents
> node install

[fsevents] Success: "/Users/ruan/workspace/projects/another-project/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> [email protected] install /Users/ruan/workspace/projects/another-project/node_modules/nodent-runtime
> node build.js

## Built /Users/ruan/workspace/projects/another-project/node_modules/nodent-runtime/dist/index.js

> [email protected] install /Users/ruan/workspace/projects/another-project/node_modules/yorkie
> node bin/install.js

setting up Git hooks
done

added 1549 packages from 1195 contributors and audited 13684 packages in 32.041s
found 0 vulnerabilities


🚀  Invoking generators...
📦  Installing additional dependencies...


> [email protected] install /Users/ruan/workspace/projects/another-project/node_modules/node-sass
> node scripts/install.js

Cached binary found at /Users/ruan/.npm/node-sass/4.9.0/darwin-x64-64_binding.node

> [email protected] postinstall /Users/ruan/workspace/projects/another-project/node_modules/node-sass
> node scripts/build.js

Binary found at /Users/ruan/workspace/projects/another-project/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Testing binary
Binary is fine
added 133 packages from 125 contributors and audited 14952 packages in 13.743s
found 9 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

⠋  Running completion hooks...error: Unable to resolve path to module '@/components/HelloWorld.vue' (import/no-unresolved) at another-project/src/views/Home.vue:10:24:
   8 | <script>
   9 | // @ is an alias to /src
> 10 | import HelloWorld from '@/components/HelloWorld.vue';
     |                        ^
  11 | 
  12 | export default {
  13 |   name: 'home',


error: Unable to resolve path to module '@/components/HelloWorld.vue' (import/no-unresolved) at another-project/tests/unit/HelloWorld.spec.js:3:24:
  1 | import { expect } from 'chai';
  2 | import { shallowMount } from '@vue/test-utils';
> 3 | import HelloWorld from '@/components/HelloWorld.vue';
    |                        ^
  4 | 
  5 | describe('HelloWorld.vue', () => {
  6 |   it('renders props.msg when passed', () => {


2 errors found.
Error: Process exited with code 1
    at exports.exit (/Users/ruan/workspace/projects/another-project/node_modules/@vue/cli-shared-utils/lib/exit.js:7:11)
    at lint (/Users/ruan/workspace/projects/another-project/node_modules/@vue/cli-plugin-eslint/lint.js:72:5)
    at api.onCreateComplete (/Users/ruan/workspace/projects/another-project/node_modules/@vue/cli-plugin-eslint/generator.js:94:24)
    at Creator.create (/usr/local/lib/node_modules/@vue/cli/lib/Creator.js:168:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)
⠙

May be related to:
vuejs-templates/webpack#144
#422

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions