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

Cannot set property 'filename' of undefined #1378

Closed
p-kuen opened this issue May 28, 2018 · 1 comment
Closed

Cannot set property 'filename' of undefined #1378

p-kuen opened this issue May 28, 2018 · 1 comment

Comments

@p-kuen
Copy link

p-kuen commented May 28, 2018

Version

3.0.0-beta.11

Reproduction link

https://github.com/Patcher56/vue-flowy/blob/master/package.json

Steps to reproduce

  1. yarn install
  2. Type in yarn dev into terminal for building in development mode for target library and watch it for changes

What is expected?

Building my library in development mode and watch it for changes

What is actually happening?

An error (seems unhandled) appears:

⠋  Building for development as library (commonjs   umd)... ERROR  TypeError: Cannot set property 'filename' of undefined
TypeError: Cannot set property 'filename' of undefined
    at config.plugin.tap.args (/home/patrick/dev/vue-flowy/node_modules/@vue/cli-service/lib/commands/build/resolveLibConfig.js:38:30)
    at Object.tap (/home/patrick/dev/vue-flowy/node_modules/webpack-chain/src/Plugin.js:19:24)
    at genConfig (/home/patrick/dev/vue-flowy/node_modules/@vue/cli-service/lib/commands/build/resolveLibConfig.js:37:12)
    at module.exports (/home/patrick/dev/vue-flowy/node_modules/@vue/cli-service/lib/commands/build/resolveLibConfig.js:99:5)
    at build (/home/patrick/dev/vue-flowy/node_modules/@vue/cli-service/lib/commands/build/index.js:74:52)
    at Service.run (/home/patrick/dev/vue-flowy/node_modules/@vue/cli-service/lib/Service.js:167:12)
    at Object.<anonymous> (/home/patrick/dev/vue-flowy/node_modules/@vue/cli-service/bin/vue-cli-service.js:22:9)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I am no pro with vue-cli-service or webpack. Can be possible that I misconfigured something.
Anyway it would be cool if there appears a better error description with the information what I did wrong.
Node version stable 10.0.0

@LinusBorg
Copy link
Member

When building with --target lib you also have to define a --name for the generated UMD lib to use.

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