代码之家  ›  专栏  ›  技术社区  ›  Bird87 ZA

机组安装后NPM启动中断

  •  1
  • Bird87 ZA  · 技术社区  · 7 年前

    create-react-native-app 现在。现在使用react 0.55.2。


    当我从网站运行这些命令时:

    create-react-native-app AwesomeProject
    

    npm start 它工作得很好。

    "react-native-form-builder": "^1.0.15",
    

    我就跑 npm install NPM启动

    C:\everforms>npm start
    
    > everforms@0.1.0 start C:\everforms
    > react-native-scripts start
    
    11:57:29: Starting packager...
    ***ERROR STARTING PACKAGER***
    No issue with doctor-npm-version
    No issue with doctor-watchman-version
    No issue with doctor-problem-checking-watchman-version
    No issue with doctor-both-app-and-exp-json
    No issue with doctor-schema-validation
    No issue with doctor-validate-asset-fields
    No issue with doctor-schema-validation-exception
    No issue with doctor-unversioned
    No issue with doctor-versions-endpoint-failed
    No issue with doctor-invalid-sdk-version
    No issue with doctor-node-modules-missing
    No issue with doctor-react-native-not-installed
    
    C:\everforms\node_modules\react-native\local-cli\cliEntry.js:30
    import type {CommandT} from './commands';
    ^^^^^^
    
    SyntaxError: Unexpected token import
        at createScript (vm.js:80:10)
        at Object.runInThisContext (vm.js:139:10)
        at Module._compile (module.js:616:28)
        at Module._compile (C:\everforms\node_modules\pirates\lib\index.js:91:24)
        at Module._extensions..js (module.js:663:10)
        at Object.newLoader [as .js] (C:\everforms\node_modules\pirates\lib\index.js:96:7)
        at Module.load (module.js:565:32)
        at tryModuleLoad (module.js:505:12)
        at Function.Module._load (module.js:497:3)
        at Module.require (module.js:596:17)
    11:57:35: Error starting packager: Error: Metro Bundler process exited with code 1
        at ChildProcess.<anonymous> (C:\xdl@50.5.0\src\Project.js:1215:14)
        at Generator.next (<anonymous>)
        at step (C:\everforms\node_modules\xdl\build\Project.js:1768:191)
        at C:\everforms\node_modules\xdl\build\Project.js:1768:437
        at new Promise (<anonymous>)
        at ChildProcess.<anonymous> (C:\everforms\node_modules\xdl\build\Project.js:1768:99)
        at ChildProcess.packagerProcess.once (C:\xdl@50.5.0\src\Project.js:1213:5)
        at Object.onceWrapper (events.js:317:30)
        at emitTwo (events.js:126:13)
        at ChildProcess.emit (events.js:214:7)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! everforms@0.1.0 start: `react-native-scripts start`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the everforms@0.1.0 start 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\alber\AppData\Roaming\npm-cache\_logs\2018-07-05T09_57_35_135Z-debug.log
    

    2 回复  |  直到 7 年前
        1
  •  1
  •   gomes    7 年前

    0.56

    issue

        2
  •  2
  •   Paolo Dell'Aguzzo    7 年前

    react-native init --version="0.55.4" MyNewApp
    

    this GitHub issue

    推荐文章