taro构建RN代码报错



  • yarn安装的,yarn版本1.13.0,安装环境node版本10.15.3,npm版本6.4.1
    安装完成后,构建h5、weapp、alipay都正常,唯独rn报错,报错信息如下:
    微信截图_20190530114842.png
    log日志内容:

    0 info it worked if it ends with ok
    1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
    1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
    1 verbose cli   'run',
    1 verbose cli   'dev:rn' ]
    2 info using npm@6.4.1
    3 info using node@v10.15.3
    4 verbose run-script [ 'predev:rn', 'dev:rn', 'postdev:rn' ]
    5 info lifecycle my-app@1.0.0~predev:rn: my-app@1.0.0
    6 info lifecycle my-app@1.0.0~dev:rn: my-app@1.0.0
    7 verbose lifecycle my-app@1.0.0~dev:rn: unsafe-perm in lifecycle true
    8 verbose lifecycle my-app@1.0.0~dev:rn: PATH: C:\Users\lenovo\AppData\Roaming\nvm\v10.15.3\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\front-end-project\【2019-5-27】migu小程序\taro-demo\my-app\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Diskeeper Corporation\ExpressCache\;D:\SVN\bin;C:\Program Files (x86)\Yarn\bin\;C:\Users\lenovo\AppData\Roaming\nvm;C:\Program Files\nodejs;D:\Microsoft VS Code\bin;D:\tomcat\bin;C:\Users\lenovo\AppData\Local\Yarn\bin;C:\Users\lenovo\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\lenovo\AppData\Local\Programs\Fiddler;C:\Users\lenovo\AppData\Local\Android\Sdk\platform-tools
    9 verbose lifecycle my-app@1.0.0~dev:rn: CWD: E:\front-end-project\【2019-5-27】migu小程序\taro-demo\my-app
    10 silly lifecycle my-app@1.0.0~dev:rn: Args: [ '/d /s /c', 'npm run build:rn -- --watch' ]
    11 silly lifecycle my-app@1.0.0~dev:rn: Returned: code: 1  signal: null
    12 info lifecycle my-app@1.0.0~dev:rn: Failed to exec dev:rn script
    13 verbose stack Error: my-app@1.0.0 dev:rn: `npm run build:rn -- --watch`
    13 verbose stack Exit status 1
    13 verbose stack     at EventEmitter.<anonymous> (C:\Users\lenovo\AppData\Roaming\nvm\v10.15.3\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
    13 verbose stack     at EventEmitter.emit (events.js:189:13)
    13 verbose stack     at ChildProcess.<anonymous> (C:\Users\lenovo\AppData\Roaming\nvm\v10.15.3\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
    13 verbose stack     at ChildProcess.emit (events.js:189:13)
    13 verbose stack     at maybeClose (internal/child_process.js:970:16)
    13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
    14 verbose pkgid my-app@1.0.0
    15 verbose cwd E:\front-end-project\【2019-5-27】migu小程序\taro-demo\my-app
    16 verbose Windows_NT 6.1.7601
    17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev:rn"
    18 verbose node v10.15.3
    19 verbose npm  v6.4.1
    20 error code ELIFECYCLE
    21 error errno 1
    22 error my-app@1.0.0 dev:rn: `npm run build:rn -- --watch`
    22 error Exit status 1
    23 error Failed at the my-app@1.0.0 dev:rn script.
    23 error This is probably not a problem with npm. There is likely additional logging output above.
    24 verbose exit [ 1, true ]
    


  • 求救,npm 6.9.0、 6.4.1、5.3.0都试过,都报错



  • Cannot find module 'tslint/lib/error' #3209 https://github.com/NervJS/taro/issues/3209

    Symous created this issue in NervJS/taro

    closed Cannot find module 'tslint/lib/error' #3209



  • @蜘蛛paipai 试了可以,非常感谢


登录后回复