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

clean install of from npm cannot be used in gulp / browserify #174

Closed
apge-Jeremy opened this issue Aug 16, 2017 · 3 comments
Closed

clean install of from npm cannot be used in gulp / browserify #174

apge-Jeremy opened this issue Aug 16, 2017 · 3 comments
Assignees

Comments

@apge-Jeremy
Copy link

Expected Behavior

i should be able to npm install --save vue-chartjs
then const Bar = require('vue-chartjs').Bar; in my modules, and my gulp/browserify build should work as normal.

Actual Behavior

Babel (which is not used anywhere in my project) begins to throw errors on build. I think it is possible that a post install step is not being hit because it is attempting to build the module in browserify rather than just require it.

{ ReferenceError: [BABEL] C:\GIT Projects\atlas-ui\node_modules\vue-chartjs\dist\vue-chartjs.js: Unknown option: C:\GIT Projects\atlas-ui\node_modules\vue-chartjs\package.json.presets while parsing file: C:\GIT Projects\atlas-ui\node_modules\vue-chartjs\dist\vue-chartjs.js at Logger.error (C:\GIT Projects\atlas-ui\node_modules\babelify\node_modules\babel-core\lib\transformation\file\logger.js:58:11) at OptionManager.mergeOptions (C:\GIT Projects\atlas-ui\node_modules\babelify\node_modules\babel-core\lib\transformation\file\options\option-manager.js:126:29) at OptionManager.addConfig (C:\GIT Projects\atlas-ui\node_modules\babelify\node_modules\babel-core\lib\transformation\file\options\option-manager.js:107:10) at OptionManager.findConfigs (C:\GIT Projects\atlas-ui\node_modules\babelify\node_modules\babel-core\lib\transformation\file\options\option-manager.js:171:32) at OptionManager.init (C:\GIT Projects\atlas-ui\node_modules\babelify\node_modules\babel-core\lib\transformation\file\options\option-manager.js:229:12) at File.initOptions (C:\GIT Projects\atlas-ui\node_modules\babelify\node_modules\babel-core\lib\transformation\file\index.js:147:75) at new File (C:\GIT Projects\atlas-ui\node_modules\babelify\node_modules\babel-core\lib\transformation\file\index.js:137:22) at Pipeline.transform (C:\GIT Projects\atlas-ui\node_modules\babelify\node_modules\babel-core\lib\transformation\pipeline.js:164:16) at Babelify._flush (C:\GIT Projects\atlas-ui\node_modules\babelify\index.js:27:22) at Babelify.<anonymous> (_stream_transform.js:118:12) filename: 'C:\\GIT Projects\\atlas-ui\\node_modules\\vue-chartjs\\dist\\vue-chartjs.js', stream:

Environment

  • vue.js version: 2.3.3
  • vue-chart.js version: 2.8.2
  • npm version: 4.1.2
  • node version 7.5.0
@apertureless
Copy link
Owner

This could be related to this https://github.com/apertureless/vue-chartjs/blob/develop/package.json#L139-L143 which was added with #51

To be honest, I can't really remember why it was added 🙈 The structure and build output changed over time. So they may were reasons back then.

But I don't think it is really needed anymore.

@apertureless apertureless self-assigned this Aug 22, 2017
@apertureless
Copy link
Owner

@apge-Jeremy

Are you using the vue-cli tempalte ? Or do you have a custom build pipeline?
I need to reproduce it to check if it will be fixed, if I remove the babelify stuff from package.json

@apertureless
Copy link
Owner

close due to inactivity

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

No branches or pull requests

2 participants