WuTheFWasThat / vimflowy

An open source productivity tool drawing inspiration from workflowy and vim
https://www.wuthejeff.com/vimflowy
MIT License
1.6k stars 111 forks source link

Web-pack-devserver dependency conflict #290

Closed ahane closed 6 years ago

ahane commented 6 years ago

Hey Jeff, great project! I would love to add my own theme and generally see if i can write a plugin or two.. The production version (npm run build && npm run startprod) runs without any problems on my system.

Sadly i could not get the dev server to run. Both with npm i and npm ic I get the following exception when when starting with npm start: `

ts-node src/server/dev.ts Starting development server TypeError: Cannot read property 'compile' of undefined at addCompilerHooks (/home/alec/dev/vimflowy/node_modules/webpack-dev-server/lib/Server.js:71:16) at new Server (/home/alec/dev/vimflowy/node_modules/webpack-dev-server/lib/Server.js:81:5) at /home/alec/dev/vimflowy/src/server/dev.ts:75:18 at step (/home/alec/dev/vimflowy/src/server/dev.ts:32:23) at Object.next (/home/alec/dev/vimflowy/src/server/dev.ts:13:53) at /home/alec/dev/vimflowy/src/server/dev.ts:7:71 at new Promise () at __awaiter (/home/alec/dev/vimflowy/src/server/dev.ts:3:12) at main (/home/alec/dev/vimflowy/src/server/dev.ts:49:12) at Object. (/home/alec/dev/vimflowy/src/server/dev.ts:94:1) ` Looking around I found (https://github.com/webpack/webpack-dev-server/issues/1334). it seem like this is some dependency conflict going on here..

Can you confirm that the devserver runs on your system with a fresh install of a freshly cloned repo?

ahane commented 6 years ago

> npm -v
6.2.0`
ahane commented 6 years ago

> ts-node -v
ts-node v3.1.0
node v8.9.4
typescript v2.8.3
ahane commented 6 years ago

>  webpack-dev-server -v
/home/alec/dev/vimflowy/node_modules/ajv-keywords/keywords/instanceof.js:52
    throw new Error('invalid "instanceof" keyword value ' + c);
    ^

Error: invalid "instanceof" keyword value Promise
    at getConstructor (/home/alec/dev/vimflowy/node_modules/ajv-keywords/keywords/instanceof.js:52:11)
    at Ajv.compile (/home/alec/dev/vimflowy/node_modules/ajv-keywords/keywords/instanceof.js:21:27)
    at Object.useCustomRule (/home/alec/dev/vimflowy/node_modules/ajv/lib/compile/index.js:289:26)
    at Object.generate_custom [as code] (/home/alec/dev/vimflowy/node_modules/ajv/lib/dotjs/custom.js:31:24)
    at Object.generate_validate [as validate] (/home/alec/dev/vimflowy/node_modules/ajv/lib/dotjs/validate.js:228:37)
    at Object.generate_anyOf [as code] (/home/alec/dev/vimflowy/node_modules/ajv/lib/dotjs/anyOf.js:34:27)
    at generate_validate (/home/alec/dev/vimflowy/node_modules/ajv/lib/dotjs/validate.js:228:37)
    at localCompile (/home/alec/dev/vimflowy/node_modules/ajv/lib/compile/index.js:99:22)
    at Ajv.compile (/home/alec/dev/vimflowy/node_modules/ajv/lib/compile/index.js:67:13)
    at _compile (/home/alec/dev/vimflowy/node_modules/ajv/lib/ajv.js:328:29)
WuTheFWasThat commented 6 years ago

yikes, thanks for reporting this. investigating now!

WuTheFWasThat commented 6 years ago

your link was useful! upgrading webpack fixed the issue, please try again at master