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

Build failed for a freshly created project #5072

Closed
eLoyyyyy opened this issue Jan 12, 2020 · 1 comment
Closed

Build failed for a freshly created project #5072

eLoyyyyy opened this issue Jan 12, 2020 · 1 comment

Comments

@eLoyyyyy
Copy link

Version

4.1.2

Environment info

System:
    OS: macOS Mojave 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
  Binaries:
    Node: 13.1.0 - ~/.nvm/versions/node/v13.1.0/bin/node
    Yarn: Not Found
    npm: 6.12.1 - ~/.nvm/versions/node/v13.1.0/bin/npm
  Browsers:
    Chrome: 79.0.3945.117
    Firefox: 71.0
    Safari: 13.0.4
  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.2
    @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.2
    @vue/cli-plugin-babel: ^4.1.0 => 4.1.2
    @vue/cli-plugin-eslint: ^4.1.0 => 4.1.2
    @vue/cli-plugin-router: ^4.1.0 => 4.1.2
    @vue/cli-plugin-vuex:  4.1.2
    @vue/cli-service: ^4.1.0 => 4.1.2
    @vue/cli-shared-utils:  4.1.2
    @vue/component-compiler-utils:  3.1.1
    @vue/preload-webpack-plugin:  1.1.1
    @vue/web-component-wrapper:  1.2.0
    eslint-plugin-vue: ^5.0.0 => 5.2.3
    vue: ^2.6.10 => 2.6.11
    vue-eslint-parser:  5.0.0
    vue-hot-reload-api:  2.3.4
    vue-loader:  15.8.3
    vue-router: ^3.1.3 => 3.1.3
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.10 => 2.6.11
    vue-template-es2015-compiler:  1.9.1
  npmGlobalPackages:
    @vue/cli: 4.1.2

Steps to reproduce

vue create sample-project
cd sample-project
npm run build

What is expected?

Build complete

What is actually happening?

 ERROR  Failed to compile with 1 errors                                                               12:48:11 PM

 error  in ./src/main.js

Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
[BABEL] /Users/zybjaredvaldez/Documents/code/sample-project/src/main.js: Package exports for '/Users/zybjaredvaldez/Documents/code/sample-project/node_modules/@babel/helper-compilation-targets' do not define a '.' subpath (While processing: "/Users/zybjaredvaldez/Documents/code/sample-project/node_modules/@vue/cli-plugin-babel/preset.js")
    at PoolWorker.fromErrorObj (/Users/zybjaredvaldez/Documents/code/sample-project/node_modules/thread-loader/dist/WorkerPool.js:262:12)
    at /Users/zybjaredvaldez/Documents/code/sample-project/node_modules/thread-loader/dist/WorkerPool.js:204:29
    at applyExports (internal/modules/cjs/loader.js:485:15)
    at resolveExports (internal/modules/cjs/loader.js:508:12)
    at Function.Module._findPath (internal/modules/cjs/loader.js:577:20)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:879:27)
    at Function.Module._load (internal/modules/cjs/loader.js:785:27)
    at Module.require (internal/modules/cjs/loader.js:956:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/Users/zybjaredvaldez/Documents/code/sample-project/node_modules/@babel/preset-env/lib/debug.js:8:33)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)

 @ multi ./src/main.js

After investigating, @babel/preset-env released a new version 5 hours ago (at the time of this writing) and always break my build, even with the default project template. Since I had a working project prior, I checked the dependencies. @babel/preset-env@7.8.0 is the problem. I always have a working build on @babel/preset-env@7.7.7. So what I did was added @babel/preset-env@7.7.7 into the devDependencies of my package.json.

@haoqunjiang
Copy link
Member

It's an old bug in Node.js v13.1.0 nodejs/node#29932
Please use the latest version.

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

2 participants