DigitalCloud / nova-custom-views

This package allows you to override default nova views
78 stars 41 forks source link

Can't run "npm run watch". #16

Open tatevik2 opened 5 years ago

tatevik2 commented 5 years ago

Hi. I'm trying to use your package but I'm getting an error(Module build failed: TypeError: this.setDynamic is not a function) running 'npm run watch' or 'npm run development'. Could you please help me to know why am I getting this kind of error?

ballin2 commented 5 years ago

Same here

Error: Module build failed: TypeError: this.setDynamic is not a function

Reproduce: 1) Install package 2) Run php artisan nova:dashboard

Pamposgsk commented 5 years ago

Hi. I'm trying to use your package but I'm getting an error(Module build failed: TypeError: this.setDynamic is not a function) running 'npm run watch' or 'npm run development'. Could you please help me to know why am I getting this kind of error?

hi i got the same error .Did you find the solution?

vhkhb commented 5 years ago

Hi. I'm trying to use your package but I'm getting an error(Module build failed: TypeError: this.setDynamic is not a function) running 'npm run watch' or 'npm run development'. Could you please help me to know why am I getting this kind of error?

Hello, Same error for me too. Please tell us what's the solution for this?

urtzi88 commented 5 years ago

Hi @tatevik2, this worked for me: https://github.com/DigitalCloud/nova-custom-views/issues/4#issuecomment-459830767

tanthammar commented 5 years ago
  1. Follow the instructions in the nova documentation on how to to compile Nova's javascript for development. https://nova.laravel.com/docs/2.0/customization/frontend.html#javascript
  2. Run npm install in the nova directory. (vendor/laravel/nova/)
  3. cd to your nova custom views directory
  4. run npm watch or dev.
  5. (empty your browser cache)

No need to change anything else.

edwinencomienda commented 5 years ago

`> @ development c:\laragon\www\laravel\nova-components\views\user

cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

11% building modules 12/13 modules 1 active ...el\nova\resources\js\views\Detail.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }. 95% emitting

ERROR Failed to compile with 1 errors 11:34:37 AM error in C:/laragon/www/laravel/nova/resources/js/views/Detail.vue

Module build failed: TypeError: this.setDynamic is not a function at PluginPass.pre (c:\laragon\www\laravel\nova-components\views\user\node_modules\babel-plugin-transform-runtime\lib\index.js:31:12) at transformFile (C:\laragon\www\laravel\node_modules\@babel\core\lib\transformation\index.js:78:27) at runSync (C:\laragon\www\laravel\node_modules\@babel\core\lib\transformation\index.js:45:3) at runAsync (C:\laragon\www\laravel\node_modules\@babel\core\lib\transformation\index.js:35:14) at process.nextTick (C:\laragon\www\laravel\node_modules\@babel\core\lib\transform.js:34:34) at process._tickCallback (internal/process/next_tick.js:61:11)

@ C:/laragon/www/laravel/nova/resources/js/views/Detail.vue 4:21-389 @ ./node_modules/babel-loader/lib?{"cacheDirectory":true,"presets":[["env",{"modules":false,"targets":{"browsers":["> 2%"],"uglify":true}}]],"plugins":["transform-object-rest-spread",["transform-runtime",{"polyfill":false,"helpers":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/js/views/Detail.vue @ ./resources/js/views/Detail.vue @ ./resources/js/views ^.\/.*$ @ ./resources/js/views.js @ multi ./resources/js/views.js ./resources/sass/views.scss`

Still getting this error @tanthammar

zxc20033 commented 5 years ago

`> @ development c:\laragon\www\laravel\nova-components\views\user

cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

11% building modules 12/13 modules 1 active ...el\nova\resources\js\views\Detail.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }. 95% emitting

ERROR Failed to compile with 1 errors 11:34:37 AM error in C:/laragon/www/laravel/nova/resources/js/views/Detail.vue

Module build failed: TypeError: this.setDynamic is not a function at PluginPass.pre (c:\laragon\www\laravel\nova-components\views\user\node_modules\babel-plugin-transform-runtime\lib\index.js:31:12) at transformFile (C:\laragon\www\laravel\node_modules@babel\core\lib\transformation\index.js:78:27) at runSync (C:\laragon\www\laravel\node_modules@babel\core\lib\transformation\index.js:45:3) at runAsync (C:\laragon\www\laravel\node_modules@babel\core\lib\transformation\index.js:35:14) at process.nextTick (C:\laragon\www\laravel\node_modules@babel\core\lib\transform.js:34:34) at process._tickCallback (internal/process/next_tick.js:61:11)

@ C:/laragon/www/laravel/nova/resources/js/views/Detail.vue 4:21-389 @ ./node_modules/babel-loader/lib?{"cacheDirectory":true,"presets":[["env",{"modules":false,"targets":{"browsers":["> 2%"],"uglify":true}}]],"plugins":["transform-object-rest-spread",["transform-runtime",{"polyfill":false,"helpers":false}]]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./resources/js/views/Detail.vue @ ./resources/js/views/Detail.vue @ ./resources/js/views ^./.*$ @ ./resources/js/views.js @ multi ./resources/js/views.js ./resources/sass/views.scss`

Still getting this error @tanthammar

try to set devDependencies of nova-components/views/YOURVIEW/package.json to

    "laravel-mix": "^4.0.7",

i got it working after updated the version