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

Standard setup is broken #4918

Closed
wsmarsh opened this issue Dec 2, 2019 · 8 comments
Closed

Standard setup is broken #4918

wsmarsh opened this issue Dec 2, 2019 · 8 comments

Comments

@wsmarsh
Copy link

wsmarsh commented Dec 2, 2019

Version

4.1.1

Reproduction link

https://github.com/wsmarsh/test-error

Environment info

System:
    OS: Windows 10 10.0.17763
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
  Binaries:
    Node: 12.13.1 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.12.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.17763.771.0
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.1.2
    @vue/babel-preset-app:  4.1.1
    @vue/babel-preset-jsx:  1.1.2
    @vue/babel-sugar-functional-vue:  1.1.2
    @vue/babel-sugar-inject-h:  1.1.2
    @vue/babel-sugar-v-model:  1.1.2
    @vue/babel-sugar-v-on:  1.1.2
    @vue/cli-overlay:  4.1.1
    @vue/cli-plugin-babel: ^4.1.0 => 4.1.1
    @vue/cli-plugin-e2e-nightwatch: ^4.1.0 => 4.1.1
    @vue/cli-plugin-router: ^4.1.0 => 4.1.1
    @vue/cli-plugin-typescript: ^4.1.0 => 4.1.1
    @vue/cli-plugin-unit-mocha: ^4.1.0 => 4.1.1
    @vue/cli-plugin-vuex: ^4.1.0 => 4.1.1
    @vue/cli-service: ^4.1.0 => 4.1.1
    @vue/cli-shared-utils:  4.1.1
    @vue/component-compiler-utils:  3.0.2
    @vue/preload-webpack-plugin:  1.1.1
    @vue/test-utils: 1.0.0-beta.29 => 1.0.0-beta.29
    @vue/web-component-wrapper:  1.2.0
    typescript: ~3.5.3 => 3.5.3
    vue: ^2.6.10 => 2.6.10
    vue-class-component: ^7.0.2 => 7.1.0
    vue-hot-reload-api:  2.3.4
    vue-loader:  15.7.2
    vue-property-decorator: ^8.3.0 => 8.3.0
    vue-router: ^3.1.3 => 3.1.3
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.10 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
    vuex: ^3.1.2 => 3.1.2
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

This is the standard setup, which is broken from the get-go

Created a project from the Vue UI

npm run serve - broken
npm run test:unit - broken

What is expected?

Vue CLI sereve and tests should work

What is actually happening?

running both serve and test:unit via npm causes an error

@daverodal
Copy link

I get this error

Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/xxxx/mobx/vue-ddd/src/main.js: Cannot find module './src/data' (While processing: "/Usersxxxx/mobx/vue-ddd/node_modules/@vue/cli-plugin-babel/preset.js")

what is ./src/data and why does babel want it all the sudden?

@wsmarsh
Copy link
Author

wsmarsh commented Dec 2, 2019

@vue/cli-plugin-babel/preset.js points to module.exports = require('@vue/babel-preset-app')
(https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/babel-preset-app/index.js)

But I can't see any reference to src/data in there

@daverodal
Copy link

mine may be different
i just do vue create project and take minimum defaults and then run npm run serve

@daverodal
Copy link

sorry i did not run your setup I just did a vue create and got my error

@f-elix
Copy link

f-elix commented Dec 2, 2019

Running into this exact same issue with version 4.1.1

@aljaff94
Copy link

aljaff94 commented Dec 2, 2019

when updating packages to last version using ncu -g the problem also happened

@grahamnordstrom
Copy link

grahamnordstrom commented Dec 2, 2019

Just ran into this as well. The issue is in node_modules/core-js-compat/helpers.js
Line 3 const data = require('./src/data');

The workaround
Should read const data = require('./data');

Also the core-js team is aware of the issue (zloirock/core-js#710)

and should be fixed in v3.4.7

@aljaff94
Copy link

aljaff94 commented Dec 2, 2019

fixed by install this package
npm i core-js-compat@3.4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants