facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.87k stars 24.3k forks source link

upgrading to 0.14 on windows 10 fails at "react-native upgrade" #3956

Closed ippa closed 8 years ago

ippa commented 8 years ago

Been using react-native 0.13.* in windows 10 for 2-3 weeks I encountered this when trying to follow the upgrade-instrucions to upgrade to 0.14.0.

Steps in a working 0.13.0 project: 1) edit package.json to entering react-native 0.14.0 as a dep 2) running "npm install" 3) Running "react-native upgrade" gives me this:

'/**' is not recognized as an internal or external command,
operable program or batch file.
'*' is not recognized as an internal or external command,
operable program or batch file.
'*' is not recognized as an internal or external command,
operable program or batch file.
'*' is not recognized as an internal or external command,
operable program or batch file.
'*' is not recognized as an internal or external command,
operable program or batch file.
'*' is not recognized as an internal or external command,
operable program or batch file.
'*' is not recognized as an internal or external command,
operable program or batch file.
'*' is not recognized as an internal or external command,
operable program or batch file.
child_process.js:464
    throw err;
    ^

Error: Command failed: C:\Users\ippa\Documents\Projects\contacts\node_modules\react-native\local-cli\setup_env.bat
'/**' is not recognized as an internal or external command,
operable program or batch file.
'*' is not recognized as an internal or external command,
operable program or batch file.
'*' is not recognized as an internal or external command,
operable program or batch file.
'*' is not recognized as an internal or external command,
operable program or batch file.
'*' is not recognized as an internal or external command,
operable program or batch file.
'*' is not recognized as an internal or external command,
operable program or batch file.
'*' is not recognized as an internal or external command,
operable program or batch file.
'*' is not recognized as an internal or external command,
operable program or batch file.

    at checkExecSyncError (child_process.js:441:13)
    at Object.execFileSync (child_process.js:461:13)
    at Object.run (C:\Users\ippa\Documents\Projects\contacts\node_modules\react-native\local-cli\cli.js:59:16)
    at Object.<anonymous> (C:\Users\ippa\AppData\Roaming\npm\node_modules\react-native-cli\index.js:73:7)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:134:18)

I also tried nuking "node_nodules"-directory and running "npm install" before "react-native upgrade" with the same results.

ippa commented 8 years ago

Digging a bit further, setup_env.bat contains only this:

/**
 * Copyright (c) 2015-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 */

and windows gets confused trying to execute that.

browniefed commented 8 years ago

@facebook-github-bot answered

facebook-github-bot commented 8 years ago

Closing this issue as @browniefed says the question asked has been answered. Please help us by asking questions on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.