Electron-react-boilerplate: can't npm dev in win but i got some findings that make it work

Created on 17 Jul 2016  路  3Comments  路  Source: electron-react-boilerplate/electron-react-boilerplate

first

i got a error code says that electron-prebuilt module in node_module have a less of path.txt and dist folder,but i dont know why this file weak occur since i always use npm install

second

it still wont work and i found that package.json the start-hot script has problem so i compare the script to others and change to

"start-hot": "cross-env HOT=1 NODE_ENV=development electron ./ -r babel-register -r babel-polyfill ./main.development.js"

it get work ,but i dont know this method is a popular solution ?

question

All 3 comments

i got a error code says that electron-prebuilt module in node_module have a less of path.txt and dist folder,but i dont know why this file weak occur since i always use npm install

Could you check npm install successful? If you haven't reference node-gyp installation for Windows, it will broken and lead some postinstall script (like electron-prebuilt) not started, otherwise it should be work.

@andy547320 try theses steps:

rm -rf node_modules
npm cache clean
npm i
npm rb
npm run dev

Had the same mistake, and had to do the following to fix.

rm -rf node_modules
npm install --msvs_version=2015

If you have visual Studio 2013 chances are you'll have to use the build tools for that version.

npm install --msvs_version=2013

Was this page helpful?
0 / 5 - 0 ratings

Related issues

helpceo picture helpceo  路  3Comments

marksalpeter picture marksalpeter  路  3Comments

cameronb23 picture cameronb23  路  3Comments

juangl picture juangl  路  4Comments

jooohhn picture jooohhn  路  3Comments