Local development error.
anuraghazra opened this issue · 2 comments
anuraghazra commented
i was trying to run npm run dev-server
but it throws this error, i thinks its trying to find some /data/data.json
folder
View logs
$ npm run dev-server
> 1loc@ dev-server D:\CAM Files\Dreamwaver\Javascript\contrib\1loc
> npm run copy && npm run data && webpack-dev-server
> 1loc@ copy D:\CAM Files\Dreamwaver\Javascript\contrib\1loc
> rm -rf dist && mkdir dist && cp -rf public/* dist
> 1loc@ data D:\CAM Files\Dreamwaver\Javascript\contrib\1loc
> node bin/generateData.js
internal/fs/utils.js:230
throw err;
^
Error: ENOENT: no such file or directory, open 'D:\CAM Files\Dreamwaver\Javascript\contrib\1loc\data\data.json'
at Object.openSync (fs.js:457:3)
at Object.writeFileSync (fs.js:1282:35)
at Object.<anonymous> (D:\CAM Files\Dreamwaver\Javascript\contrib\1loc\bin\generateData.js:32:4)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'D:\\CAM Files\\Dreamwaver\\Javascript\\contrib\\1loc\\data\\data.json'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! 1loc@ data: `node bin/generateData.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the 1loc@ data 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\user\AppData\Roaming\npm-cache\_logs\2020-05-04T16_35_33_909Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! 1loc@ dev-server: `npm run copy && npm run data && webpack-dev-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the 1loc@ dev-server 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\user\AppData\Roaming\npm-cache\_logs\2020-05-04T16_35_33_953Z-debug.log
anuraghazra commented
update: after manually creating /data/data.json file it worked
phuocng commented
npm run dev-server
will also run npm run data
. I'll need to check why it doesn't work.