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

LIB_VERSION is not defined #310

Closed
Laruxo opened this issue Feb 11, 2018 · 10 comments
Closed

LIB_VERSION is not defined #310

Laruxo opened this issue Feb 11, 2018 · 10 comments

Comments

@Laruxo
Copy link

Laruxo commented Feb 11, 2018

With 3.2 release I see that you added LIB_VERSION constant that you resolve with webpack.

However when using webpack 2 to build my project I also have to define this constant or revert code changes in es/index.js.
Without that, I get ReferenceError: LIB_VERSION is not defined

I think this package should work without modifications like this.

@t202wes
Copy link

t202wes commented Feb 11, 2018

Having the same error. @Laruxo where and how do you define it to make it work?

@markers16123
Copy link

markers16123 commented Feb 12, 2018

I get the same error as following on the all browser with windows 10 (chrome, ie 11, firefox, opera... etc). (note that is working good on the osx.)

index.js?5253:4 Uncaught ReferenceError: LIB_VERSION is not defined
at eval (index.js?5253:4)
at Object../node_modules/vue-chartjs/es/index.js (app.js:2903)
at webpack_require (app.js:679)
at fn (app.js:89)
at eval (selector.js?type=script&index=0!./src/components/Update/Dashboard/VersionChart.vue:1)
at Object../node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/Update/Dashboard/VersionChart.vue (app.js:1045)
at webpack_require (app.js:679)
at fn (app.js:89)
at eval (VersionChart.vue?139a:1)
at Object../src/components/Update/Dashboard/VersionChart.vue (app.js:3412)

@faustbrian
Copy link

faustbrian commented Feb 12, 2018

@markers16123
Copy link

I tried version 3.1.0 but the error still occurs.

"dependencies": {
"axios": "^0.17.1",
"chart.js": "^2.7.1",
"es6-promise": "^4.2.3",
"vue": "^2.5.2",
"vue-chartjs": "^3.1.0",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
},

@faustbrian
Copy link

Your version constraint pulls in everything that matches 3.1.0 or higher. You need to specifically require "vue-chartjs": "3.1.0".

@markers16123
Copy link

Thanks a lot. It works perfectly.
Do you know if I should continue to use this version?
Or, can I use the latest version in the future?

@faustbrian
Copy link

The error is currently caused by the build process with Webpack so once that is fixed you should be able to pull in ^3.2.0.

For now just use 3.1.0 and wait for a fix.

@markers16123
Copy link

Okay. I understood everything.
Thanks.

@pesama
Copy link

pesama commented Feb 12, 2018

Same error happening here. Dwgrading to 3.1.0 worked.

apertureless added a commit that referenced this issue Feb 12, 2018
The lib version is also defined in the webpack banner plugin, so actually there is no need to include it into the lib object.
Closes issue #310
@apertureless
Copy link
Owner

apertureless commented Feb 12, 2018

Sorry for that. Did not thought about the case, that if the es sources will be loaded the webpack.define() plugin will not work.

It's fixed now in 3.2.1

chuber-my-bad-xT0BKFyZt9MMx9xkpW

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

6 participants