can anyone help me to solve the following error in django-vue integration

128 views
Skip to first unread message

Pradeep Singh

unread,
Aug 1, 2019, 11:18:11 PM8/1/19
to django...@googlegroups.com
F:\django-vue project\djangoVueProject\frontend\webpack.config.js:81
      'vue$': 'vue/dist/vue.esm.js'
            ^

SyntaxError: Unexpected token :
    at Module._compile (internal/modules/cjs/loader.js:721:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at requireConfig (F:\django-vue project\djangoVueProject\frontend\node_modules\webpack\bin\convert-argv.js:97:18)
    at F:\django-vue project\djangoVueProject\frontend\node_modules\webpack\bin\convert-argv.js:104:17
    at Array.forEach (<anonymous>)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fron...@1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --open --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fron...@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\acer\AppData\Roaming\npm-cache\_logs\2019-08-02T03_06_13_266Z-debug.log

NILOTPAL GHOSH

unread,
Aug 2, 2019, 7:00:18 AM8/2/19
to Django users
Can you tell what you are trying to achieve?

Pradeep Singh

unread,
Aug 2, 2019, 9:59:00 AM8/2/19
to django...@googlegroups.com
I want to integrate django backend with  the  vue.js front-end  but when  I m config. Webpack bundle tracker then getting above error 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3dc817c9-d758-461b-84c9-f43929d37406%40googlegroups.com.
IMG_20190802_170214887.jpg
Message has been deleted

Sam W

unread,
Aug 2, 2019, 12:16:52 PM8/2/19
to Django users
Did you add 'corsheaders', to the settings file? 

The Error is very clear: 
npm ERR! fron...@1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --open --hot`
Install :  pip install django-cors-headers

Then add: 'corsheaders',to the INSTALLED_APPS inside settings file in Django server side
 

Pradeep Singh

unread,
Aug 2, 2019, 2:29:05 PM8/2/19
to django...@googlegroups.com
Yes but same error are occur


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

mohamed habib

unread,
Aug 2, 2019, 2:51:15 PM8/2/19
to django...@googlegroups.com
I suspect its a syntax error in your webpack.conf.js file. Can you show us the entire webpack.conf.js file please. paste it somewhere like pastebin and link us to it



--
Best regards,
Mohammed M. Habib, PhD

Pradeep Singh

unread,
Aug 2, 2019, 10:40:25 PM8/2/19
to django...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages