Closed gelinger777 closed 4 years ago
This error does not apply to this package, it is related to the webpack.
Apparently you do not have a webpack loader for .js
extension.
Maybe this will help you: https://webpack.js.org/loaders/babel-loader/
Maybe you have exclude
in your webpack loader for node_modules
, see this issue.
I am using Laravel's standard loader. I think it has already babel. Need to check what's wrong.
@gelinger777 Interesting. It seems not only you have such a problem: https://github.com/iliyaZelenko/tiptap-vuetify-nuxt/issues/3#issuecomment-554107553. Maybe my answer will be useful to you.
{
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"dependencies": {
"axios": "^0.18",
"bootstrap": "^4.1.1",
"collect.js": "^4.16.6",
"colyseus.js": "^0.11.5",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-echo": "^1.5.4",
"laravel-mix": "^2.0",
"lodash": "^4.17.15",
"moment": "^2.10.6",
"popper.js": "^1.12",
"promise": "^7.1.1",
"pusher-js": "^5.0.1",
"rtlcss": "^2.2",
"sweetalert": "^1.1.3",
"tiptap": "^1.26.4",
"tiptap-extensions": "^1.28.4",
"tiptap-vuetify": "^2.8.0",
"urijs": "^1.17.0",
"vue": "2.*",
"vue-drag-resize": "^1.3.2",
"vue-icon-picker": "^1.0.0",
"vue-spinners": "^1.0.2",
"vue-svgicon": "^3.2.6",
"vue-youtube": "^1.4.0",
"vue-youtube-embed": "^2.2.2",
"vuejs-dialog": "^1.4.1",
"vuetify": "^2.1.3",
"vuex": "^3.1.1"
},
"devDependencies": {
"@fortawesome/fontawesome-free": "^5.11.2",
"vuex-undo-redo": "^1.1.4"
}
}
Here is my package.json.
I will check the link. Thank you.
I wonder what version of Node.js you have installed? Laravel-mix requires >=8.9.0
. Perhaps updating the version will solve the problem.
Sorry again for the inconvenience. You have an unusual problem.
@iliyaZelenko thank you, I will try to figure out on my own. I think the problem could be the NVM not NPM .
Closing for now.
@gelinger777 Did you figure it out?
I was (am) struggling with this exact error message. I have a SPA within my laravel project and I'm therefore using laravel mix (version 2.1.14) to compile my assets.
The error disappears with version 5 of laravel mix, but there's some issues with dynamic imports rendering the final .css files empty. According to Jeffrey this will get fixed once webpack 5 is released.
My workaround so far:
{
"scripts": {
"app-scss": "node-sass resources/assets/dashboard/sass -o public/css --importer node_modules/node-sass-import",
}
}
To use the fix:
My full package.json
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"app-scss": "node-sass resources/assets/dashboard/sass -o public/css",
"public-scss": "node-sass resources/assets/guest/sass -o public/css"
},
"devDependencies": {
"axios": "^0.18",
"bootstrap": "^4.0.0",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^5.0.0",
"lodash": "^4.17.4",
"popper.js": "^1.12",
"resolve-url-loader": "^3.1.0",
"sass": "^1.23.7",
"sass-loader": "^8.0.0",
"vue": "^2.5.17"
},
"dependencies": {
"@fortawesome/fontawesome-pro": "^5.11.2",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"bowser": "^1.9.3",
"clipboard": "^2.0.4",
"date-fns": "^1.29.0",
"jspdf": "^1.5.3",
"laravel-echo": "^1.5.2",
"moment": "^2.22.2",
"node-sass": "^4.13.0",
"pusher-js": "^4.3.1",
"quill-emoji": "^0.1.7",
"tiptap-vuetify": "^2.8.0",
"vee-validate": "^2.1.0-beta.2",
"vue-analytics": "^5.16.1",
"vue-carousel": "^0.18.0",
"vue-chat-scroll": "^1.3.5",
"vue-cookies": "^1.5.4",
"vue-echarts": "^3.1.2",
"vue-infinite-scroll": "^2.0.2",
"vue-json-csv": "^1.2.2",
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.0.1",
"vue-stripe-elements-plus": "^0.3.0",
"vue-template-compiler": "^2.5.17",
"vue2-dropzone": "^3.5.2",
"vuetify": "^2.1.9",
"vuex": "^3.0.1",
"workbox-webpack-plugin": "^3.6.3"
}
}
@fredekiel my problem was that I had installed NVM. SO I had to make
nvm use node
and then
npm run watch
Any ideas why this error happens?
ERROR in ./node_modules/tiptap-vuetify/dist/bundle-esm.js Module parse failed: Unexpected token (4925:17) You may need an appropriate loader to handle this file type. | render(h, context) { | const data = { | props: { ...context.props, | name | }, @ ./resources/js/app.js 50:0-53 @ multi ./resources/js/app.js ./resources/sass/app.scss ./resources/sass/app-rtl.scss