Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After start vue-cli-3 tutorial project 98% after emitting CopyPlugin #4174

Closed
ArtyomBist opened this issue Jun 20, 2019 · 27 comments
Closed
Labels
cannot reproduce We cannot reproduce the problem with the given information. More env information needed.

Comments

@ArtyomBist
Copy link

Version

3.8.4

Environment info

 System:
    OS: Windows 10
    CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
  Binaries:
    Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 42.17134.1.0
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.0.0
    @vue/babel-preset-app:  3.8.0
    @vue/babel-preset-jsx:  1.0.0
    @vue/babel-sugar-functional-vue:  1.0.0
    @vue/babel-sugar-inject-h:  1.0.0
    @vue/babel-sugar-v-model:  1.0.0
    @vue/babel-sugar-v-on:  1.0.0
    @vue/cli-overlay:  3.8.0
    @vue/cli-plugin-babel: ^3.8.0 => 3.8.0
    @vue/cli-plugin-eslint: ^3.8.0 => 3.8.0
    @vue/cli-service: ^3.8.0 => 3.8.4
    @vue/cli-shared-utils:  3.8.0
    @vue/component-compiler-utils:  2.6.0
    @vue/preload-webpack-plugin:  1.1.0
    @vue/web-component-wrapper:  1.2.0
    eslint-plugin-vue: ^5.0.0 => 5.2.2 (4.7.1)
    vue: ^2.6.10 => 2.6.10
    vue-eslint-parser:  5.0.0 (2.0.3)
    vue-hot-reload-api:  2.3.3
    vue-loader:  15.7.0
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.10 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

Download Nodejs version 10.16.0 , install, npm install -g @vue/cli , vue create hello-world , npm run serve

What is expected?

project is compiled

What is actually happening?

INFO Starting development server...
98% after emitting CopyPlugin

@haoqunjiang
Copy link
Member

Please provide an actual reproduction repo.

@haoqunjiang haoqunjiang added the needs reproduction This issue is missing a minimal runnable reproduction, provided by the author label Jun 20, 2019
@ArtyomBist
Copy link
Author

@haoqunjiang haoqunjiang removed the needs reproduction This issue is missing a minimal runnable reproduction, provided by the author label Jun 20, 2019
@haoqunjiang
Copy link
Member

I'm sorry but I can't reproduce this issue on my machine.
I guess this may be related to your filesystem, file permissions, network environment, terminal, etc… But not likely Vue CLI itself.

@haoqunjiang haoqunjiang added the cannot reproduce We cannot reproduce the problem with the given information. More env information needed. label Jun 20, 2019
@ArtyomBist
Copy link
Author

ArtyomBist commented Jun 20, 2019

@sodatea yes man, I tried run on virtual machine and everything is ok, sorry for for request

@sam-araiza
Copy link

I'm getting the same 98% after emitting CopyPlugin ERROR Failed to compile with 976 errors 6:00:26 PM

@eduardosada
Copy link

Me too:

98% after emitting CopyPlugin

and that's it. No response.

@DrMarkEy
Copy link

I experienced the same issue when I tried to use

import {someFunction} from '';

, i.e. I forgot to specify the package to import from.

@BartusZak
Copy link

Any ideas?

error

@tapriandi
Copy link

I have the same problem, but after debugging I found a mistake from my router file.
the problem is: "forget to submit path and component"
hope this can help you

@ssabalak
Copy link

ssabalak commented Nov 9, 2019

I had such a problem. Somewhere in the code I left an empty import and forgot. Code:

import {} from ''

Hope this can help you

@givingwu
Copy link

givingwu commented Dec 2, 2019

I got the same problem like @ssabalak and @DrMarkEy , search those codes in your project folder:

import ''

or

import {} from ''

Hope this can help you. But if Vue-CLI can detects this syntax error when import an empty string can let us be less confusing. @sodatea thanks. :)

@Edwing123
Copy link

I was getting this problem too, but for me it was defining a route in the routes (vue-router) but without creating the view component, it just hung out.

@walter-la
Copy link

I got the same error message, but I resolved it.
In my case, I just change different branch. after that, I change back the original branch, then it doesn't work when I run "npm run serve".

The problem is all import paths are case sensitive!
So when I change to the old branch, it changes my directory name to uppercase letters( before I use uppercase directory name). But the latest branch I already changed to lowercase letters for directory name.

For example, if your import like below:
component: () => import('@/views/test/Test'),
then you should check the directory's name and file's name must be the same uppercase letters and lowercase letters.

haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this issue Jan 20, 2020
closes vuejs#2547
closes vuejs#5032

I'm still very hesitant on adding this feature, though.

First, this change allows project creation in a folder with uppercase
letters in its name. It is strongly discouraged and may cause many
weird issues all over the ecosystem.

For example, vuejs#5022, vuejs#4424, vuejs#3665, vuejs#4174#issuecomment-569709494 are all
caused by case issues. Adding support for uppercase project names will
only worsen this situation.

Secondly, it adds a lot of maintenance burden to us. As noted in the
comments, these prompts are hard to test right now (because
`createTestProject` runs in another process so it's hard to intercept
the prompts). Even if such test utilities are added in the future, it's
still very tedious to take care of all the case issues in the test
suite.

What's worse is that we can affect the project folders created by
@vue/cli by converting the project name to lower case. But for
`vue create .`, we cannot change the current folder's name. So, we'll
have another edge case to test.
@Abhishek325
Copy link

I had this problem because of an empty import (component: () => import("")) in my router.js as I was importing it with import router from "./router/index"; in main.js

@rodrigoaraujolima92
Copy link

Tive o mesmo problema quando tentei usar

import {someFunction} from '';

, ou seja, eu esqueci de especificar o pacote para importar.

Very Very Tnks !

@edsel77
Copy link

edsel77 commented Jun 16, 2020

I experienced the same issue when I tried to use

import {someFunction} from '';

, i.e. I forgot to specify the package to import from.

thanks man haha

@alidadaashi
Copy link

I think you forget to copy the files that starts with '.' like: .env or .eslint
press the cmnd + shift + . to show this hidden files and copy them.

@Nvhub
Copy link

Nvhub commented Oct 13, 2020

I have same problem stuck in 98%.

98% after emitting CopyPlugin

In my case, I recheck again my code, and I found my import path is invalid, something like :

import { myComponent } from ''

After fix the code, It works again.

@arrowing
Copy link

There was same error for me, the problem is that I lost my vue.config.js file.

@yang-builds
Copy link

我也遇到了同样的问题,已经排除了importrequire或者from引用为空的状况,我已经没有办法了

@arrowing
Copy link

@YoungHearts 看看是不是vue.config.js丢失了,我是误删了。

@rookie-hhm
Copy link

maybe your import path is invalid like:

import { getPDF } from ''

@joobei
Copy link

joobei commented Feb 26, 2021

I had the same problem. Turns out one of my imports was
import { packageName} from ''

@xieerduos
Copy link

Version

3.8.4

Environment info

 System:
    OS: Windows 10
    CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
  Binaries:
    Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 42.17134.1.0
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.0.0
    @vue/babel-preset-app:  3.8.0
    @vue/babel-preset-jsx:  1.0.0
    @vue/babel-sugar-functional-vue:  1.0.0
    @vue/babel-sugar-inject-h:  1.0.0
    @vue/babel-sugar-v-model:  1.0.0
    @vue/babel-sugar-v-on:  1.0.0
    @vue/cli-overlay:  3.8.0
    @vue/cli-plugin-babel: ^3.8.0 => 3.8.0
    @vue/cli-plugin-eslint: ^3.8.0 => 3.8.0
    @vue/cli-service: ^3.8.0 => 3.8.4
    @vue/cli-shared-utils:  3.8.0
    @vue/component-compiler-utils:  2.6.0
    @vue/preload-webpack-plugin:  1.1.0
    @vue/web-component-wrapper:  1.2.0
    eslint-plugin-vue: ^5.0.0 => 5.2.2 (4.7.1)
    vue: ^2.6.10 => 2.6.10
    vue-eslint-parser:  5.0.0 (2.0.3)
    vue-hot-reload-api:  2.3.3
    vue-loader:  15.7.0
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.10 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

Download Nodejs version 10.16.0 , install, npm install -g @vue/cli , vue create hello-world , npm run serve

What is expected?

project is compiled

What is actually happening?

INFO Starting development server...
98% after emitting CopyPlugin

require(‘’)

@hzh-test
Copy link

hzh-test commented Feb 4, 2022

I also encountered this problem.
Maybe the problem is "vue.config.js" file setting.
You can see this article
[entry] in the CLI command is defined as the entry file (default: src/main.js or src/main.ts in TypeScript project), not an additional entry file. If you overwrite the entry in the CLI, then the entries from config.pages are no longer considered, which may cause an error.
So remove module.exports, it maybe work, and I was successed.
After that, you can remove less code to find the district error place.

@justfeizai
Copy link

This problem will occur as long as the path of import is written wrong. I don't know what happened, it was fine before

@justfeizai
Copy link

This problem will occur as long as the path of import is written wrong. I don't know what happened, it was fine before

Delete the code, re-pull the code, reinstall vscode, problem solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cannot reproduce We cannot reproduce the problem with the given information. More env information needed.
Projects
None yet
Development

No branches or pull requests