upash / peco

nothing here, move on..
MIT License
209 stars 12 forks source link

dev server breaks when anything changes in the source folder #28

Open asifm opened 6 years ago

asifm commented 6 years ago

(I'm using Windows 10, node 10.2.1)

peco@0.1.10 and peco@0.1.11 do not let the dev server run. yarn run dev results in this webpack error:

PS C:\Users\***\firstdraft.today> yarn run dev
yarn run v1.3.2
$ peco dev
> Building from source
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.output.path: The provided value "C:/Users/***/firstdraft.today/.peco/dist/client" is not an absolute path!
   -> The output directory as **absolute path** (required).
    at webpack (C:\Users\***\firstdraft.today\node_modules\webpack\lib\webpack.js:24:9)
    at Peco.dev (C:\Users\***\firstdraft.today\node_modules\peco\lib\index.js:289:40)
    at <anonymous>

peco@0.1.9 seems fine. The only problem is this: when the dev server is running, any change in the file system -- for example, adding a new file in source folder or changing a current file in source folder -- will break the dev server (see the error below). Everything is fine if the yarn run dev command is executed after making the changes in the source folder.

TypeError: Cannot read property 'isVirtual' of undefined
    at Promise.all.files.map (C:\Users\***\firstdraft2.today\node_modules\peco\plugins\source-file-system\index.js:163:27)    at Array.map (<anonymous>)
    at SourceFileSystem.buildFiles (C:\Users\***\firstdraft2.today\node_modules\peco\plugins\source-file-system\index.js:161:13)
    at SourceFileSystem.onChangeFile (C:\Users\***\firstdraft2.today\node_modules\peco\plugins\source-file-system\index.js:333:16)
    at FSWatcher.filesWatcher.on.on.on (C:\Users\***\firstdraft2.today\node_modules\peco\plugins\source-file-system\index.js:72:24)
    at FSWatcher.emit (events.js:182:13)
    at FSWatcher.<anonymous> (C:\Users\***\firstdraft2.today\node_modules\chokidar\index.js:199:15)
    at FSWatcher._emit (C:\Users\***\firstdraft2.today\node_modules\chokidar\index.js:241:5)
    at FSWatcher.<anonymous> (C:\Users\***\firstdraft2.today\node_modules\chokidar\lib\nodefs-handler.js:264:16)
    at FSReqWrap.oncomplete (fs.js:183:5)
awulkan commented 6 years ago

Same for me. Would be nice to have a fix since I'd like to try this project out.

awulkan commented 6 years ago

@egoist Do you know why this happens? Any idea of how to fix it? Waiting to try out Peco but I can't even start the dev server right now. :/

frncsdrk commented 6 years ago

@asifm @AWulkan Does the issue persist with Node 10.9.x and peco@0.2.2?

flozero commented 5 years ago

Hello i writted a PR that correct the bug all explain in it

let's look here 🗡 https://github.com/upash/peco/pull/34

If you add me as contributor i will try to help more 🥇