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

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

Open
tatevik2 opened this issue Mar 11, 2019 · 7 comments
Open

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

tatevik2 opened this issue Mar 11, 2019 · 7 comments

Comments

@tatevik2
Copy link

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
Copy link

ballin2 commented Mar 19, 2019

Same here

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

Reproduce:

  1. Install package
  2. Run php artisan nova:dashboard

@Pamposgsk
Copy link

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
Copy link

vhkhb commented Mar 24, 2019

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
Copy link

urtzi88 commented Apr 4, 2019

Hi @tatevik2, this worked for me:
#4 (comment)

@tanthammar
Copy link

  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
Copy link

`> @ 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
Copy link

`> @ 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

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

8 participants