hypatia
hypatia copied to clipboard
after running npm run dev getting this error
{ Error: ENOENT: no such file or directory, open '.env'
at Object.openSync (fs.js:443:3)
at Object.readFileSync (fs.js:343:35)
at Object.config (/Users/sunil/Desktop/new project/nekomy-platform/node_modules/dotenv/lib/main.js:30:37)
at Object.
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at maybeCallback (fs.js:128:9)
at Object.writeFile (fs.js:1163:14)
at VersionFile.writeFile (/Users/sunil/Desktop/new project/nekomy-platform/node_modules/webpack-version-file-plugin/index.js:54:8)
at /Users/sunil/Desktop/new project/nekomy-platform/node_modules/webpack-version-file-plugin/index.js:42:18
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: webpack-dev-server --config ./webpack/webpack-dev.config.js --watch --colors
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /Users/sunil/.npm/_logs/2020-06-23T11_11_50_796Z-debug.log
Where you able to fix it ?
Unfortunately not. I think that it is due to the application code rather than the configuration of plesk.
Thanks
From: Xoagub [email protected] Reply-To: nekomy/nekomy-platform [email protected] Date: Sunday, September 6, 2020 at 2:22 PM To: nekomy/nekomy-platform [email protected] Cc: Subscribed [email protected] Subject: Re: [nekomy/nekomy-platform] after running npm run dev getting this error (#44)
Where you able to fix it ?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/nekomy/nekomy-platform/issues/44#issuecomment-687861920, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AF6PJXOAAWTH5KAUW6HDRZLSEPHPHANCNFSM4OFSN54Q.
I feel this has to do with the ejs script attempting to update the version number. Since I was trying this out in local, the version thingy was not critical to me....so i went and commented out the version update logic :
File to edit: <Your-Code-Base-Folder>/webpack/webpack.config.js Line number: 66
The initial version was :
plugins: [
new WebpackVersionFilePlugin({
packageFile: Path.join(__dirname, '../package.json'),
template: Path.join(__dirname, '../version.ejs'),
outputFile: Path.join(__dirname, '../static/version.json')
}),
I commented out the first array element, post commenting, it was
plugins: [
/*new WebpackVersionFilePlugin({
packageFile: Path.join(__dirname, '../package.json'),
template: Path.join(__dirname, '../version.ejs'),
outputFile: Path.join(__dirname, '../static/version.json')
}), */
That solved this problem.....