vue-notion
vue-notion copied to clipboard
1.4.4 | 1.5.0 introduce new Module parse failed
node v16.15 [email protected] [email protected]
To find a solution to #121 I try to update [email protected] and use [email protected]
The result is a new error about Module parse.
ERROR Failed to compile with 1 error 16:09:27
error in ./node_modules/vue-notion/dist/esm.js
Module parse failed: Unexpected token (16:31)
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
| let index = -1;
| Object.keys(blockMap).forEach(id => {
> blockMap[id].value.content?.forEach(blockId => {
| const blockType = blockMap[blockId]?.value?.type;
| if (blockType && blockType !== lastType) {
@ ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/WaterPump/PumpCalibration/PumpCalibrationDialog/TutorialItem.vue?vue&type=script&lang=js& 1:0-59 5:4-18 23:26-39
@ ./src/components/WaterPump/PumpCalibration/PumpCalibrationDialog/TutorialItem.vue?vue&type=script&lang=js&
@ ./src/components/WaterPump/PumpCalibration/PumpCalibrationDialog/TutorialItem.vue
@ ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/WaterPump/PumpCalibration/PumpCalibrationDialog/PumpCalibrationDialog.vue?vue&type=script&lang=js&
@ ./src/components/WaterPump/PumpCalibration/PumpCalibrationDialog/PumpCalibrationDialog.vue?vue&type=script&lang=js&
@ ./src/components/WaterPump/PumpCalibration/PumpCalibrationDialog/PumpCalibrationDialog.vue
@ ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/WaterPump/WaterPumpBlock/WaterPumpBloc.vue?vue&type=script&lang=js&
@ ./src/components/WaterPump/WaterPumpBlock/WaterPumpBloc.vue?vue&type=script&lang=js&
@ ./src/components/WaterPump/WaterPumpBlock/WaterPumpBloc.vue
@ ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/views/WaterPumpsView.vue?vue&type=script&lang=js&
@ ./src/views/WaterPumpsView.vue?vue&type=script&lang=js&
@ ./src/views/WaterPumpsView.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.0.68:8081&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
Each object key looking like blockMap[id].value.content?.forEach cannot be parsed because the ? on the key content.
When I remove all the ? and fix syntax the module can be parsed and built.
So I don't know what happened with the syntax but vuejs2.7.14 is still not compatible.
Thanks for all the logs -- could you try updating to 1.5.1 ? 📦
Thanks for providing releases so quickly!
build was executed but with a warning :
warning in ./node_modules/vue-notion/dist/esm.js
Module not found: Error: Can't resolve 'encoding' in '<my_project_path>\node_modules\vue-notion\dist'
and of course Notion page wasn't rendered now.
Hmm, not sure about this one -- Maybe try installing the encoding npm package (i see it's a peerDep from node-fetch via cross-fetch in the package lockfile).
Might also help to remove node_modules and (e.g. nuxt) cache and npm install again.
The issue seems to be from my project because on this project with 1.4.3 or 1.5.1 the Notion page is rendered correctly.
https://github.com/MkLHX/vue_notion_test_project
I'm going to push research about what provides the issue on my side.
Maybe an idea: the historical project was built with [email protected] and the test project with [email protected]