kiki-le-singe / react-redux-universal-boilerplate

An Universal ReactJS/Redux Boilerplate
MIT License
166 stars 24 forks source link

Errors while starting in Windows #70

Closed leshicus closed 7 years ago

leshicus commented 7 years ago

While running

leshicus commented 7 years ago

1) And also npm run setup couldn't be run after the installation npm install or yarn 2) After npm run build:client I get:

running better-npm-run in D:\git\test\r1 Executing script: build:client

to be executed: "./node_modules/.bin/babel-node node_modules/.bin/webpack --progress --config webpack/prod.config" '.' is not recognized as an internal or external command, operable program or batch file.

npm ERR! Windows_NT 10.0.10586 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\volkov\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "build:client" npm ERR! node v6.9.1 npm ERR! npm v3.10.9 npm ERR! code ELIFECYCLE npm ERR! react-redux-universal-boilerplate@2.0.3 build:client: better-npm-run build:client npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the react-redux-universal-boilerplate@2.0.3 build:client script 'better-npm-run build:client'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the react-redux-universal-boilerplate package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! better-npm-run build:client npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs react-redux-universal-boilerplate npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls react-redux-universal-boilerplate npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! D:\git\test\r1\npm-debug.log

kiki-le-singe commented 7 years ago

hi @leshicus

I'm sorry I don't use windows. Have you seen this link How to fix '.' is not an internal or external command error? Maybe it'll resolve the problem.

How do you get this error? Do you run the "npm run deploy" script? Does the "npm start" script work?

This is how you should install the project. You don't need run the "npm run setup", except if you canceled the setup operation that executed on "postinstall" script.

So: 1) git clone 2) npm install or yarn 3) on postinstall you should choose between SASS or CSSNEXT 4) npm start (dev mod) 5) npm run deploy (Runs npm run build:client and npm run build:server scripts) 6) cd readyToDeploy, npm install or yarn then npm start

Let me know if the documentation it's not comprehensible.

leshicus commented 7 years ago

Hi!

  1. Sorry for my negligence, my first post should have been about npm start. It says:

to be executed: "nodemon ./node_modules/.bin/babel-node -- src/server/index" [nodemon] 1.11.0 [nodemon] to restart at any time, enter rs [nodemon] watching: D:\git\test\r2\webpack/*/ src/server/index.js src/server/koa.dev.js src/server/utils/render.js src/server/components/Html/index.jsx [nodemon] starting node ./node_modules/.bin/babel-node src/server/index D:\git\test\r2\node_modules.bin\babel-node:2 basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')") __^^^^^^^ SyntaxError: missing ) after argument list at Object.exports.runInThisContext (vm.js:76:16) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3 [nodemon] app crashed - waiting for file changes before starting...

  1. About npm run setup. I just pointed out that maybe this place is a bit misleading in the docs, because actually you don't have to use it, you get this choice during the installation.

  2. When I tried to install with yarn, it seems that many of packages didn't install at all.

  3. After npm start there are many errors like 1:26 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style

To fix it you will have to add linebreak-style: ["error","windows"] to section rulesof /.eslintrc.yaml.

Hope it will help!

kiki-le-singe commented 7 years ago

Hi @leshicus thanks for your return. I'm going to clarify the documentation.