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

Module parse failed #121

Closed
cyberz opened this issue Jan 27, 2023 · 11 comments
Closed

Module parse failed #121

cyberz opened this issue Jan 27, 2023 · 11 comments

Comments

@cyberz
Copy link

cyberz commented Jan 27, 2023

  • Nuxt 2.X
  • Node JS: 16

Module parse failed: Unexpected token (1:22615) 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 > ...

WARN  Compiled with 19 warnings


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'Fragment' (imported as 'X') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'createBlock' (imported as 'm') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'createCommentVNode' (imported as 'O') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'createElementBlock' (imported as 'c') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'createElementVNode' (imported as '_') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'createTextVNode' (imported as 'ce') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'createVNode' (imported as 'y') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'guardReactiveProps' (imported as 'Q') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'mergeProps' (imported as 'l') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'normalizeClass' (imported as 'A') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'normalizeProps' (imported as 'k') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'normalizeStyle' (imported as 'j') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'openBlock' (imported as 'r') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'renderList' (imported as 're') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'renderSlot' (imported as 'N') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'resolveComponent' (imported as 'f') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'resolveDynamicComponent' (imported as 'I') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'toDisplayString' (imported as 'U') was not found in 'vue'


WARN  in .../repo/node_modules/vue-notion/dist/vue-notion.js

"export 'withCtx' (imported as 'R') was not found in 'vue'
@Krishna-najpk
Copy link

Same issue. Can anybody answer?

@janniks
Copy link
Owner

janniks commented Feb 2, 2023

This is strange. Nothing has changed in a while. Which version of vue-notion are you using?

@Krishna-najpk
Copy link

I installed using npm install vue-notion command for vuejs project and it added 3.0.0-alpha.1 version for me

@janniks
Copy link
Owner

janniks commented Feb 2, 2023

Apologies, the latest tag was pointing to an alpha version (which only works with vue 3). This is resolved now. You can install again using npm install vue-notion@latest or npm install vue-notion@^1.4.3

@Krishna-najpk
Copy link

I installed using npm install vue-notion@^1.4.3 but I am still getting this error...

ERROR Failed to compile with 1 errors friendly-errors 19:10:22

ERROR in ./node_modules/vue-notion/dist/esm.js friendly-errors 19:10:22

Module parse failed: Unexpected token (1793:175) friendly-errors 19:10:22
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
|
| // return empty notion decorated text if row is empty

  return (this === null || this === void 0 ? void 0 : (_this$properties = this.properties) === null || _this$properties === void 0 ? void 0 : _this$properties[columnId]) ?? [[" ", false]];

| },
|

@MkLHX
Copy link

MkLHX commented Feb 18, 2023

Same issue here.
nodejs 16
vuejs 2.6.14
vue-notion 1.4.3

ERROR  Failed to compile with 1 error2:07:32 PM
error  in ./node_modules/vue-notion/dist/esm.js
Module parse failed: Unexpected token (1793:175)
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

// return empty notion decorated text if row is empty
return (this === null || this === void 0 ? void 0 : (_this$properties = this.properties) === null || _this$properties === void 0 ? void 0 : _this$properties[columnId]) ?? [[" ", false]];},

the error is provided by esm.js from dist folder line 1788 to 1800.

the method is:

cell(columnId) {
      var _this$properties;

      // return empty notion decorated text if row is empty
      return (this === null || this === void 0 ? void 0 : (_this$properties = this.properties) === null || _this$properties === void 0 ? void 0 : _this$properties[columnId]) ?? [[" ", false]];
},

When I the return statement is commented no error was encountered.

Did you manage to fix it?

@MkLHX
Copy link

MkLHX commented Feb 19, 2023

Hello there!

I think there is a link to this issue: vuejs/vue-cli#7209

The error is on file dist/esm.js line 1793 column 175 and it's a ?? (Nullish coalescing operator) causing the error.
Look at my previous comment at the end of the return line you could find ?? operator.
When I remove ?? to put simple ternary operator the build can be processed.

I continue to search about this behavior and try to find a solution.

@janniks
Copy link
Owner

janniks commented Feb 19, 2023

Thanks for the debugging 🙏
I removed the ?? operator manually and will push a new version.

@MkLHX
Copy link

MkLHX commented Feb 19, 2023

@janniks tank you

@janniks
Copy link
Owner

janniks commented Feb 19, 2023

I pushed the change and some updates to version 1.5.0 -- please try if that solves all the issues you are seeing 🙏

@janniks janniks closed this as completed Feb 19, 2023
@MkLHX
Copy link

MkLHX commented Feb 19, 2023

@janniks I had just tried it and got a new error see #126

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

4 participants