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

nuxt buefy typescript error ? #262

Open
iznotek opened this issue Dec 4, 2021 · 1 comment
Open

nuxt buefy typescript error ? #262

iznotek opened this issue Dec 4, 2021 · 1 comment

Comments

@iznotek
Copy link

iznotek commented Dec 4, 2021

hye, it seem to be a bigint problem caused by 0.039_28... but i do not understand ? any idea...

in ./node_modules/bulma-css-vars/node_modules/color/index.js                  friendly-errors 15:54:32

Module parse failed: Identifier directly after number (257:26)                        friendly-errors 15:54:32
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|               for (const [i, element] of rgb.entries()) {
|                       const chan = element / 255;
>                       lum[i] = (chan <= 0.039_28) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
|               }
| 
                                                                                      friendly-errors 15:54:32
 @ ./node_modules/bulma-css-vars/dist/bulma-color-tools.js 4:14-30
 @ ./node_modules/bulma-css-vars/dist/index.js
 @ ./node_modules/esbuild-loader/dist??ref--11-0!./node_modules/vue-loader/lib??vue-loader-options!./components/layout/Navbar.vue?vue&type=script&lang=ts&
 @ ./components/layout/Navbar.vue?vue&type=script&lang=ts&
 @ ./components/layout/Navbar.vue
 @ ./.nuxt/components/index.js
 @ ./.nuxt/components/plugin.js
 @ ./.nuxt/index.js
 @ ./.nuxt/client.js
 @ multi ./.nuxt/color-mode/script.js ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js

thanks

@wtho
Copy link
Owner

wtho commented Dec 5, 2021

The code containing Numeric Separators is part of the color library (source code), which is used by this package.

Which node version do you use?

Numeric Separators are supported by NodeJS since version 12.5.0, which is the current LTS. If you use an older version, you should update to v12 anyways.

If you use NodeJS v12 or higher, this seems to be a problem of nuxt, the vue-loader or the ts-loader.

The only action point I see for me is

  • notifying the color maintainers to set the engines value in package.json to a minimum of 12.5.0 (PR)
  • setting the engines value in package.json for bulma-css-vars to a minimum of 12.5.0

Can you please get back to me if the issue was an outdated NodeJS version?

Cheers!

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