问答详情
源自:2-3 webpack-dev-server的配置和使用

2-3 设置 webpack-dev-server的时候卡在了第一次执行npm run dev的地方了

以下是报错信息


D:\wang\muke\vue-vueRouter-vuex-ssr\vue-todo-demo\node_modules\ajv-keywords\keywords\instanceof.js:52

    throw new Error('invalid "instanceof" keyword value ' + c);

    ^


Error: invalid "instanceof" keyword value Promise

    at getConstructor (D:\wang\muke\vue-vueRouter-vuex-ssr\vue-todo-demo\node_modules\ajv-keywords\keywords\instanceof.js:52:11)

    at Ajv.compile (D:\wang\muke\vue-vueRouter-vuex-ssr\vue-todo-demo\node_modules\ajv-keywords\keywords\instanceof.js:21:27)

    at Object.useCustomRule (D:\wang\muke\vue-vueRouter-vuex-ssr\vue-todo-demo\node_modules\ajv\lib\compile\index.js:275:26)

    at Object.generate_custom [as code] (D:\wang\muke\vue-vueRouter-vuex-ssr\vue-todo-demo\node_modules\ajv\lib\dotjs\custom.js:32:24)

    at Object.generate_validate [as validate] (D:\wang\muke\vue-vueRouter-vuex-ssr\vue-todo-demo\node_modules\ajv\lib\dotjs\validate.js:347:35)

    at Object.generate_anyOf [as code] (D:\wang\muke\vue-vueRouter-vuex-ssr\vue-todo-demo\node_modules\ajv\lib\dotjs\anyOf.js:34:27)

    at generate_validate (D:\wang\muke\vue-vueRouter-vuex-ssr\vue-todo-demo\node_modules\ajv\lib\dotjs\validate.js:347:35)

    at localCompile (D:\wang\muke\vue-vueRouter-vuex-ssr\vue-todo-demo\node_modules\ajv\lib\compile\index.js:87:22)

    at Ajv.compile (D:\wang\muke\vue-vueRouter-vuex-ssr\vue-todo-demo\node_modules\ajv\lib\compile\index.js:56:13)

    at Ajv._compile (D:\wang\muke\vue-vueRouter-vuex-ssr\vue-todo-demo\node_modules\ajv\lib\ajv.js:358:27)


提问者:qq_丶用笑容改变世界_0 2018-10-29 22:55

个回答

  • 茉莉520清香
    2018-10-29 23:37:38
    已采纳

    webpack 的版本太高,你可以更换出现问题loader的版本或者降低webpack的版本

  • 慕少0106795
    2018-11-09 11:39:00

    把 webpack-dev-server版本改成2.9.1就好了

  • 慕少0106795
    2018-11-09 10:18:44

    lz,你的pageage.json截个图,我看下版本