Giter VIP home page Giter VIP logo

create-react-native-web-app's People

Contributors

closetothe avatar dependabot[bot] avatar haruelrovix avatar oryoffe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

create-react-native-web-app's Issues

Dockerfile for web-app

Is your feature request related to a problem? Please describe.
I have attempted to modify different React Native Dockerfiles to successfully build an image with this sample - but without much success.

Describe the solution you'd like
An suggested Dockerfile for Image build

How to include babel plugins?

Hi,

I'm trying to install class property support to imported libraries (via @babel/plugin-proposal-class-properties), react-native-vector-icons break for example.

This is the error I get:

Failed to compile.

./node_modules/react-native-vector-icons/lib/create-icon-set-from-fontawesome5.js
SyntaxError: .....\create-icon-set-from-fontawesome5.js: Support for the experimental syntax 'classProperties' isn't currently enabled (134:24):

132 |   function createFA5iconClass(baseClass, selectClass = iconSet => iconSet) {
133 |     class FA5iconClass extends PureComponent {
> 134 |       static propTypes = {
    |                        ^
135 |         light: PropTypes.bool,
136 |         solid: PropTypes.bool,
137 |       };

Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.

Tried adding @babel/plugin-proposal-class-properties in webpack.config.dev.js on line 224 to no avail, see below

plugins: [
    [
        require.resolve("@babel/plugin-proposal-class-properties")
    ],
    [
        require.resolve('babel-plugin-named-asset-import'),
        {
        loaderMap: {
            svg: {
            ReactComponent: '@svgr/webpack?-prettier,-svgo![path]',
            },
        },
        },
    ],
],

any idea on how I can include support for additional es features, I'm stuck. Thanks :)

v2 ios build failing

The issue is Xcode 10 requires react-native 57.x - See below the consequence of updating package.json to 57.x.

Project won't start

Describe the bug
Trying to run the script to create a project, it won't finish due to an yarn error
Any idea?

🤗

To Reproduce

  1. $ create-react-native-web-app rnw
  2. 💥

Expected behavior
It should finish the installation :)

Additional context

  • OsX High Sierra
  • yarn 1.7.0
  • node v10.9.0

Output

$ create-react-native-web-app rnw
      ⏳ Creating React Native Web App by the name of rnw ...

      ✅ Created project folder.

      ✅ Added project files.

      ⏳ Installing project dependencies...

yarn install v1.7.0
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.2.tgz: Request failed \"404 Not Found\"".
info If you think this is a bug, please open a bug report with the information provided in "/Work/tmp/rnw/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
child_process.js:640
    throw err;
    ^


Error: Command failed: cd rnw && yarn
    at checkExecSyncError (child_process.js:600:11)
    at execSync (child_process.js:637:13)
    at Object.<anonymous> (/Users/Dan/.npm-global/lib/node_modules/create-react-native-web-app/cli.js:79:3)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:266:19)

v2 test cause red warning

use v2 create a new project then npm run test

Error: Not implemented: HTMLCanvasElement.prototype.getContext (without installing the canvas npm package)

Screenshots

image

building ios fails on fresh project

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. create-react-native-web-app myApp

Install package

$ npm install -g create-react-native-web-app

Run create-react-native-web-app

$ create-react-native-web-app myApp

cd into your

$ cd myApp

Run Web/Ios/Android development

Web

$ npm run web

IOS (simulator)

$ npm run ios

Expected behavior
A clear and concise description of what you expected to happen.
npm run ios fails with

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/gitphone.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Platform:

ProductName:	Mac OS X
ProductVersion:	10.13.6
BuildVersion:	17G3025
yarn version: 1.13.0
node version: v10.8.0

Additional context
Add any other context about the problem here.

Error output below;

Unpacking /Users/prisc_000/.rncache/folly-2016.09.26.00.tar.gz...

Command PhaseScriptExecution emitted errors but did not return a nonzero exit code to indicate failure



CompileC /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/strtod.o /Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/third-party/double-conversion-1.1.5/src/strtod.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target: double-conversion)
    cd /Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/React
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu++11 -stdlib=libc++ -fmodules -fmodules-cache-path=/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wmissing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wshadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DDEBUG=1 -DRCT_DEBUG=1 -DRCT_DEV=1 -DRCT_NSASSERT=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mios-simulator-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -Wmove -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -index-store-path /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Index/DataStore -iquote /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/double-conversion-generated-files.hmap -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/double-conversion-own-target-headers.hmap -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/double-conversion-all-target-headers.hmap -iquote /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/double-conversion-project-headers.hmap -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Products/Debug-iphonesimulator/include -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/DerivedSources/x86_64 -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/DerivedSources -Wextra -Wall -Wno-semicolon-before-method-body -F/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Products/Debug-iphonesimulator -MMD -MT dependencies -MF /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/strtod.d --serialize-diagnostics /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/strtod.dia -c /Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/third-party/double-conversion-1.1.5/src/strtod.cc -o /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/strtod.o

error: Build input file cannot be found: '/Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/third-party/double-conversion-1.1.5/src/strtod.cc'

WriteAuxiliaryFile /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/double-conversion.LinkFileList (in target: double-conversion)
    cd /Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/React
    write-file /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/double-conversion.LinkFileList

CompileC /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fixed-dtoa.o /Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/third-party/double-conversion-1.1.5/src/fixed-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target: double-conversion)
    cd /Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/React
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu++11 -stdlib=libc++ -fmodules -fmodules-cache-path=/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wmissing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wshadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DDEBUG=1 -DRCT_DEBUG=1 -DRCT_DEV=1 -DRCT_NSASSERT=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mios-simulator-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -Wmove -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -index-store-path /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Index/DataStore -iquote /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/double-conversion-generated-files.hmap -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/double-conversion-own-target-headers.hmap -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/double-conversion-all-target-headers.hmap -iquote /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/double-conversion-project-headers.hmap -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Products/Debug-iphonesimulator/include -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/DerivedSources/x86_64 -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/DerivedSources -Wextra -Wall -Wno-semicolon-before-method-body -F/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Products/Debug-iphonesimulator -MMD -MT dependencies -MF /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fixed-dtoa.d --serialize-diagnostics /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fixed-dtoa.dia -c /Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/third-party/double-conversion-1.1.5/src/fixed-dtoa.cc -o /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fixed-dtoa.o
error: Build input file cannot be found: '/Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/third-party/double-conversion-1.1.5/src/fixed-dtoa.cc'

CompileC /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fast-dtoa.o /Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/third-party/double-conversion-1.1.5/src/fast-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target: double-conversion)
    cd /Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/React
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu++11 -stdlib=libc++ -fmodules -fmodules-cache-path=/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wmissing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wshadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DDEBUG=1 -DRCT_DEBUG=1 -DRCT_DEV=1 -DRCT_NSASSERT=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mios-simulator-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -Wmove -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -index-store-path /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Index/DataStore -iquote /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/double-conversion-generated-files.hmap -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/double-conversion-own-target-hea
ders.hmap -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/double-conversion-all-target-headers.hmap -iquote /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/double-conversion-project-headers.hmap -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Products/Debug-iphonesimulator/include -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/DerivedSources/x86_64 -I/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/DerivedSources -Wextra -Wall -Wno-semicolon-before-method-body -F/Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Products/Debug-iphonesimulator -MMD -MT dependencies -MF /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fast-dtoa.d --serialize-diagnostics /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fast-dtoa.dia -c /Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/third-party/double-conversion-1.1.5/src/fast-dtoa.cc -o /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fast-dtoa.o
error: Build input file cannot be found: '/Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/third-party/double-conversion-1.1.5/src/fast-dtoa.cc'


** BUILD FAILED **



The following build commands failed:
	CompileC /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/strtod.o /Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/third-party/double-conversion-1.1.5/src/strtod.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fixed-dtoa.o /Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/third-party/double-conversion-1.1.5/src/fixed-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/prisc_000/working/AMP/RNWEB/gitphone/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fast-dtoa.o /Users/prisc_000/working/AMP/RNWEB/gitphone/node_modules/react-native/third-party/double-conversion-1.1.5/src/fast-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(3 failures)

Installing build/Build/Products/Debug-iphonesimulator/gitphone.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/gitphone.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

sourcemaps not working, debugger breakpoints always on 1st line

I just created a project with version 0.1.9, added an onClick function on the demo page,
and the debugger always break on first line.

Note that I am seeing the correct untransformed source file in the debugger
console when the breadpoint is hit (debugger key word).

The debugger will not let me set breakpoints on other lines,
it is as if it is working with the minimized file while displaying the proper source file.

The problem is on both Chrome and Firefox

the devtool variable in the webpack config seems correct ('cheap-module-source-map')
I tried changing it without success.

npm run android > Cannot add task 'wrapper' as a task with that name already exists.

Here's what I've run and what it showed:

PS C:\Users\Admin\Documents\Node.js Projects\Samples\react-native-web-app> npm run android

> [email protected] android C:\Users\Admin\Documents\Node.js Projects\Samples\react-native-web-app
> react-native run-android

Scanning folders for symlinks in C:\Users\Admin\Documents\Node.js Projects\Samples\react-native-web-app\node_modules (132ms)
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug)...

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\Admin\Documents\Node.js Projects\Samples\react-native-web-app\android\build.gradle' line: 36

* What went wrong:
A problem occurred evaluating root project 'creaternwapp'.
> Cannot add task 'wrapper' as a task with that name already exists.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

Cant create app using create-react-native-web-app

Hello, I can't create app using create-react-native-web-app, it displays an error -bash: create-react-native-web-app: command not found but I already installed it using npm install -g create-react-native-web-app

Regeneratorrun time is not defined

Describe the bug
When i am trying to use async await in the components i am getting this error Regenerator run time is not defined.
To Reproduce
Steps to reproduce the behavior:

  1. Clone this project https://github.com/VISI-ONE/create-react-native-web-example
  2. Add async await in any of the component
  3. Type npm run web
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: Window
  • Browser [chrome]

Can't find variable setTimeout

Hello everyone
I have the issue in the title when I am trying to use the basic set-up of the tool.

This issue only appear when I'm trying to launch the application for Android and I can't see how I can fix this.

I have the last version of all the react element and I use yarn to install the component.

Thank you for your help

Update Libs

A great many of the libs in this project are behind. I was able to update almost all of them except just a few. Working through the issues, here's what I discovered.

WebPack 4 is the biggest change since it no longer requires as much configuration. However, I don't know enough about your particular setup to know what can/should be removed from your configs so I left them alone except for two things that were required to make it run.

In the config files for dev and prod, you have to move InterpolateHtmlPlugin after HtmlWebpackPlugin ( as per jantimon/html-webpack-plugin#875 ).

You also have to add mode: 'development' to dev and mode: 'production'` to prod ( as per https://webpack.js.org/concepts/mode/ )

This version of react-dev-utils is required until the Webpack 4 upgrade PR gets merged in:
facebook/create-react-app#4466 (comment)

React can't be updated to 16.5.x until this PR is merged and released:
necolas/react-native-web#1096

React Native 0.56.0 works, but 0.57.0 won't without React 16.5 and these changes: https://github.com/react-native-community/react-native-releases/blob/master/CHANGELOG.md#updating-to-this-version

Error: Command failed when Installing project dependencies (v0.1.7)

Describe the bug
Couldn't initialise the project successfully.

To Reproduce
Steps to reproduce the behavior:

  1. Install latest version
$ npm i -g [email protected]
  1. Initialise a project
$ create-react-native-web-app gitphone2
  1. Got an error
      ⏳ Installing project dependencies...

yarn install v1.12.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.2.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "Unexpected end of data"
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
child_process.js:651
    throw err;
    ^

Error: Command failed: cd gitphone2 && yarn
    at checkExecSyncError (child_process.js:611:11)
    at execSync (child_process.js:648:13)
    at Object.<anonymous> (/Users/haruelrovix/.nvm/versions/node/v10.13.0/lib/node_modules/create-react-native-web-app/cli.js:79:3)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)

Expected behavior
CRNWA project created successfully. Tried v0.1.6 and it worked!

  1. Install v0.1.6
$ npm i -g [email protected]
  1. Initialise a project
➜  Projects create-react-native-web-app gitphone
      ⏳ Creating React Native Web App by the name of gitphone ...

      ✅ Created project folder.

      ✅ Added project files.

      ⏳ Installing project dependencies...

yarn install v1.12.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
✨  Done in 42.80s.
      ✅ Installed project dependencies.

      ✅ Done! 😁👍 Your project is ready for development.


        * change directory to your new project
        $ cd gitphone

        $ Then run the these commands to get started:

        * To run development Web server
        $ yarn web

        * To run Android on connected device (after installing Android Debug Bridge "adb" - https://developer.android.com/studio/releases/platform-tools)
        $ yarn android

        * To run ios simulator (after installing Xcode - only on Apple devices)
        $ yarn ios

        * To run tests for Native and Web
        $ yarn test

        * To run build for Web
        $ yarn build
Additional context
nvm list v10.13.0
npm -v 6.4.1

Snapshot separation

Is your feature request related to a problem? Please describe.
currently the snapshots are being placed in the usual snapshots dedicated folder.

Describe the solution you'd like
Jest just introduced a snapshot folder resolver to enable using different folders thus enabling us to create one for native and one for web in each component

Additional context
if you do snapshots for both platforms one will delete the other as it would mark it as obsolete

New project no longer works

Describe the bug
I did a clean install of a new project and made no changes. When I ran yarn ios it failed to build. Web version builds fine.

To Reproduce
Steps to reproduce the behavior:

  1. npm install -g create-react-native-web-app
  2. create-react-native-web-app project
  3. cd project
  4. yarn web // works
  5. yarn ios // does not work

Expected behavior
Expected it to build and launch successfully.

Desktop (please complete the following information):

  • macOS High Sierra 10.13.6

Smartphone (please complete the following information):

  • Simulator iPhone 6
  • OS: 12.0

Additional context
Here's all of the error outputs during the build.

error: Build input file cannot be found: '/Users/steven/Development/project/node_modules/react-native/third-party/double-conversion-1.1.5/src/strtod.cc'

error: Build input file cannot be found: '/Users/steven/Development/project/node_modules/react-native/third-party/double-conversion-1.1.5/src/fast-dtoa.cc'

error: Build input file cannot be found: '/Users/steven/Development/project/node_modules/react-native/third-party/double-conversion-1.1.5/src/double-conversion.cc'

error: Build input file cannot be found: '/Users/steven/Development/project/node_modules/react-native/third-party/double-conversion-1.1.5/src/diy-fp.cc'

** BUILD FAILED **

The following build commands failed:

	CompileC /Users/steven/Development/project/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/strtod.o /Users/steven/Development/project/node_modules/react-native/third-party/double-conversion-1.1.5/src/strtod.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/steven/Development/project/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fixed-dtoa.o /Users/steven/Development/project/node_modules/react-native/third-party/double-conversion-1.1.5/src/fixed-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/steven/Development/project/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fast-dtoa.o /Users/steven/Development/project/node_modules/react-native/third-party/double-conversion-1.1.5/src/fast-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/steven/Development/project/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/double-conversion.o /Users/steven/Development/project/node_modules/react-native/third-party/double-conversion-1.1.5/src/double-conversion.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/steven/Development/project/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/diy-fp.o /Users/steven/Development/project/node_modules/react-native/third-party/double-conversion-1.1.5/src/diy-fp.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/steven/Development/project/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/bignum.o /Users/steven/Development/project/node_modules/react-native/third-party/double-conversion-1.1.5/src/bignum.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/steven/Development/project/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/cached-powers.o /Users/steven/Development/project/node_modules/react-native/third-party/double-conversion-1.1.5/src/cached-powers.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(7 failures)

Installing build/Build/Products/Debug-iphonesimulator/creaternwapp.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/creaternwapp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

error Command failed with exit code 1.

Android app crash with error 'com.facebook.jni.CppException : Can't find variable: setTimeout' android 64 bit with React native 0.59.10

App crashing on launch with setTimeOut error

I have created project using create-react-native-web command & upgraded 0.55.x to 0.59.10 for android 64 bit support using https://react-native-community.github.io/upgrade-helper/?from=0.55.3&to=0.59.10

We are facing below error on launching app crash -

Error in details -

com.facebook.jni.CppException: Can't find variable: setTimeout

index.android.bundle:206:7357
[email protected]:2:1670
index.android.bundle:205:53
[email protected]:2:1670
index.android.bundle:204:92
[email protected]:2:1670
index.android.bundle:13:2046
[email protected]:2:1670
index.android.bundle:11:46
[email protected]:2:1670
[email protected]:2:868
global [email protected]:304:4
    at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
    at android.os.Looper.loop(Looper.java:148)
    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:232)

Can you please help us?

Execution failed for task ':app:compileDebugAidl'

Describe the bug
Unable to run yarn android on Windows machine

To Reproduce
Steps to reproduce the behavior:

  1. create-react-native-web-app gitphone
  2. cd gitphone
  3. yarn android
  4. See error
D:\Projects\gitphone>yarn android
yarn run v1.10.1
$ react-native run-android
Scanning folders for symlinks in D:\Projects\gitphone\node_modules (55ms)
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee130Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore130Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp3130Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0554Library UP-TO-DATE
:app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugAidl'.
> java.lang.IllegalStateException: aidl is missing

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 12.387 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
Done in 16.29s.

Expected behavior
App running without error

ESlint expo config breaking third party libraries

Describe the bug

  1. use v2 create a new project
  2. copy some code from react-native-elements example
  3. boom
> node scripts/build.js

Creating an optimized production build...
Failed to compile.

./node_modules/react-native-elements/src/helpers/getIconType.js
Cannot find module: '@expo/vector-icons/Feather'. Make sure this package is installed.

You can install this package by running: yarn add @expo/vector-icons/Feather.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `node scripts/build.js`
npm ERR! Exit status 1

Expected behavior

  1. i checked the react-native-elements's code, and there is no @expo dependence.
  2. is it cause by 'babel-preset-expo' ?

Screenshots
image

Didn't find class .Main Application" on path:

image

OS; windows 10 x 64
react-native-cli: 2.0.1
react-native: 0.55.4
emulador: android studio

error:
2019-04-24 08:06:36.515 23312-23312/com.myappup E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.myappup, PID: 23312
java.lang.RuntimeException: Unable to instantiate application com.myappup.MainApplication: java.lang.ClassNotFoundException: Didn't find class "com.myappup.MainApplication" on path: DexPathList[[zip file "/data/app/com.myappup-WeBzEpEmX8pRRzvTQfjTBA==/base.apk"],nativeLibraryDirectories=[/data/app/com.myappup-WeBzEpEmX8pRRzvTQfjTBA==/lib/arm, /data/app/com.myappup-WeBzEpEmX8pRRzvTQfjTBA==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:1015)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6072)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1791)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.myappup.MainApplication" on path: DexPathList[[zip file "/data/app/com.myappup-WeBzEpEmX8pRRzvTQfjTBA==/base.apk"],nativeLibraryDirectories=[/data/app/com.myappup-WeBzEpEmX8pRRzvTQfjTBA==/lib/arm, /data/app/com.myappup-WeBzEpEmX8pRRzvTQfjTBA==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.Instrumentation.newApplication(Instrumentation.java:1095)
at android.app.LoadedApk.makeApplication(LoadedApk.java:1009)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6072) 
at android.app.ActivityThread.-wrap1(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1791) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:164) 
at android.app.ActivityThread.main(ActivityThread.java:7000) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408) 

Expo

Can i run ios and android using expo? In description this starter build with create-react-native-app?

CLI arguments/flags

Is your feature request related to a problem? Please describe.
Some users would like to have redux/mobX/electron/routing and other libraries integrated to their boilerplate.
Describe the solution you'd like
The idea is that these would be possible via arguments/flags with the cli for example:

create-react-native-web-app myApp --redux --router

so some build system to add features to the main template and create additional templates would be cool

Typescript support?

I tried to include typescript following this link.
But was facing a lot of issues. Has anybody tried implementing this ?

Also create-react-app comes with --typescript support. Can the same be incorporated in this cli

Compilation failed for styles formattage

Describe the bug
I added more eslint + prettier to the project and the style errors are prevent the compilation. I received a failed to compile error while I do expect to see which files have some styles errors I do not expect that to complete fail the compilation process.

To Reproduce
So this is my .eslintrc.js and I also install the necessary package.

module.exports = {
  extends: [
    "airbnb",
    "plugin:flowtype/recommended",
    "plugin:react/recommended",
    "prettier",
    "prettier/flowtype",
    "prettier/react"
  ],
  plugins: ["flowtype", "react", "prettier", "react-native"],
  parser: "babel-eslint",
  parserOptions: {
    ecmaVersion: 8,
    sourceType: "module",
    ecmaFeatures: {
      impliedStrict: true,
      jsx: true,
      legacyDecorators: true
    }
  },
  env: {
    es6: true,
    node: true,
    "react-native/react-native": true
  },
  rules: {
    strict: 0,
    "comma-dangle": 0,
    "no-use-before-define": 0,
    "quote-props": 1,
    "react/jsx-no-bind": 1,
    "react/prefer-stateless-function": 1,
    "padded-blocks": 0,
    "no-shadow": 1,
    "no-return-assign": 1,
    "no-case-declarations": 1,
    "react-native/no-unused-styles": 1,
    "react-native/split-platform-components": 1,
    "no-underscore-dangle": 0,
    "global-require": 0,
    "import/no-unresolved": 1,
    "no-param-reassign": 0,
    "consistent-return": 1,
    "react/no-multi-comp": 1,
    "no-confusing-arrow": 0,
    "react/jsx-filename-extension": 0,
    "no-console": 0,
    "react/forbid-prop-types": 0,
    "prettier/prettier": "error",
    "react/prefer-stateless-function": [1, { ignorePureComponents: true }],
    "react/destructuring-assignment": 0,
    "react/no-multi-comp": [0, { ignoreStateless: true }],
    "default-case": 0,
    "arrow-body-style": 0
  }
};

Expected behavior
Style errors not preventing compilations but shows as warning.

Screenshots
screenshot_20190221_095547

Desktop (please complete the following information):
Usng ubuntu with VSCode

Additional context
If go to those file and resave them and vscode will automatically reformat them to pass.

React-native at 55.x

This tool does not function on macOS Catalina without upgrading to newer react-native.

Edit: the problem is Xcode, not Catalina. Back off to Xcode 10.3 and it will work again. react-native 0.61 or better works on Xcode 11.

Hot reloading for Web

Describe the solution you'd like
I want to have Hot Reloading for web out of the box.

Describe alternatives you've considered
May be we can integrate React Hot Reload library? But which "Recipe" should we use? Can we use WebPack? Because also I want to use RN vector icons for Web, which is using WebPack.

Offtop
Your tool is very good - this is the only solution web+RN that works. Thank you for it.

fbBatchedBridge is undefined

Describe the bug
When running yarn android I get the following error in my emulator

com.facebook.react.common.JavascriptException: Failed to call function, __fbBatchedBridge is undefined

When I run yarn web the web version works fine.

screenshot_20190207_152412

To Reproduce
The project worked when I first cloned it. After that the only changes made were to rename the app. I did this two different way and both ways give me this error now.

The first was manually changing the build.gradle, AndroidManifest, MainActivity, index.js and changing the android dir to be android->app->src->main->java->com->timetracker

The second way was using the link provided via one of the developers of this code here: #30

Expected behavior
The app to build as it did prior to name change

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Linux Mint
  • Browser Chrome and Firefox (newest for both)
  • Emulator: Genymotion (Galaxy S7 API 26)

production babel build messes code

Describe the bug
Production build doesn't work where react-native-web animated is used.
If BABEL_ENV is set to development it works fine.
This was tested for both react-native-elements Input and react-native-paper Button
which both uses animation.

To Reproduce
npm i react-native-elements react-native-vector-icons
npm i -g serve
add this to App.js render method

<Input ref = { ref => this.input = ref } shake="true" placeholder="test" onChange={ x=> this.input.shake()}/>

npm run build
serve -s build
open web page and you'll see it doesnt render and an error in console.

Expected behavior
Work the same as development build and the same as CREATE-REACT-APP
npm run web works as expected
On create-react-app this works as expected also on production build
It seems something in the build definitions/ babel plugins/version is causing it

Desktop (please complete the following information):

  • OS: win/os
  • Browser chrome

“Unhandled JS Exception: Can't find variable setTimeout” in iOS only

Describe the bug
first of all, the part that seems to work out of the box is the web part. In my first attempt, after running npx create-react-native-web-app demo-app, yarn web immediately worked. :)

When running yarn iOS once I get successful builds, I get the error “Unhandled JS Exception: Can't find variable setTimeout”.

To Reproduce
I have node -v >> v11.5.0. I'm on Mohave, with xcode 10.1 already setup (for iOS development).

  • I needed to install the xcode 10.1 commandline tools though.

  • Then, I needed to yarn iOS

  • followed by opening the creaternwapp project under ios/ and change the Project Settings > Build System to Legacy Build System.

  • Then I had to attempt to build it in xcode. (turns out this is important, even though build will fail)

  • Then, (cd node_modules/react-native/third-party/glog-0.3.4/ && ./configure) // those numbers may change apparently, depending on install

  • whether I needed to or not, I changed the .babelrc from:

{
    "presets": ["module:metro-react-native-babel-preset"],
}

to:

{
  "presets": [["module:metro-react-native-babel-preset"], ["react-app"]],
  "ignore": ["node_modules/art/core/color.js"],
  "plugins": [
    ["module-resolver", {
      "alias": {
        "^react-native$": "react-native-web"
      }
    }]
  ],
}
  • then: npm install && npm audit fix and followed that with yarn install so yarn could get control back.

At this point yarn ios succeeds, but the error with setTimeout is showing on the simulator. I researched that, and apparently these sorts of errors happen when react-native install isn't complete, with the suggested solution to yarn upgrade react native. But yarn upgrade [email protected] doesn't change anything for me.

Expected behavior
Along with yarn web working just like it does, yarn iOS should also work without error

Screenshots
screenshot

Desktop (please complete the following information):

  • OS: Mohave
  • Browser Simulator
  • Version 10.1

Smartphone (please complete the following information):

  • Device: iPhone XS
  • OS: 12.1
  • Browser Simulator
  • Version 10.1

Additional context
https://stackoverflow.com/questions/54328936/unhandled-js-exception-cant-find-variable-settimeout-in-ios-only

export 'default' (reexported as 'normalize') was not found in './helpers/normalizeText'

Describe the bug
When running yarn web I am now getting this error

Support for the experimental syntax 'classProperties' isn't currently enabled (41:23):

  39 |
  40 | export default class SwipeRating extends Component {
> 41 |   static defaultProps = {
     |                       ^
  42 |     type: 'star',
  43 |     ratingImage: require('./images/star.png'),
  44 |     ratingColor: '#f1c40f',

Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.

To Reproduce
yarn web

Expected behavior
The web version to run

Desktop (please complete the following information):

  • OS: Linux Mint 18.3
  • Browser Chrome 72.0.3626.96 and Firefox 65.0

Smartphone (please complete the following information):
yarn android works fine

Additional context
I modified babel.config.js based on StackOverflow comments but it didnt seem to work

module.exports = function (api) {
    api.cache(true);
    return {
        presets: [['module:metro-react-native-babel-preset'], ['react-app']],
        ignore: ['node_modules/art/core/color.js'],
        plugins: [
            ['module-resolver', {
                'alias': {
                    '^react-native$': 'react-native-web'
                }
            }],
            ['@babel/plugin-proposal-class-properties', {
                'loose': true
            }]
        ],
    };
};

Native Snapshots Overwrite Web Snapshots

Describe the bug
the switchSnapshots() method copies files from the __snapshots__ folder into the web_snapshots folder which makes sense if the snapshots folder has been updated. Unfortunately, running the web tests and then the native tests back to back causes one to override the other. It appears to be happening here: https://github.com/VISI-ONE/rnw-starter-app/blob/master/scripts/switchSnapshots.js#L25

To Reproduce
Steps to reproduce the behavior:

  1. npm install -g create-react-native-web-app
  2. create-react-native-web-app myApp
  3. cd myApp
  4. Generate snapshots: npm run test:web -- -u && npm run test:native -- -u
  5. npm run test:web
  6. npm run test:web
  7. npm run test:native
  8. Please note the tests fail due to incorrect snapshots.

Expected behavior
The tests to pass

Screenshots
screenshot from 2018-07-13 10-28-44

Desktop (please complete the following information):

  • OS: Ubuntu 16.04 LTS
  • Browser Chrome
  • Version 67.0.3396.99 (Official Build) (64-bit)

Smartphone (please complete the following information):

  • Device: N/A
  • OS: N/A
  • Browser N/A
  • Version N/A

Additional context
Thanks for making this project!

Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.

Describe the bug
When running yarn web I am getting this error

  ./node_modules/react-native-ratings/src/SwipeRating.js
SyntaxError: /home/pmy/gitphone/node_modules/react-native-ratings/src/SwipeRating.js: Support for the experimental syntax 'classProperties' isn't currently enabled (41:23):39 | 
  40 | export default class SwipeRating extends Component {
> 41 |   static defaultProps = {
     |                       ^
  42 |     type: 'star',
  43 |     ratingImage: require('./images/star.png'),
  44 |     ratingColor: '#f1c40f',

Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.

To Reproduce
Steps to reproduce the behaviour:

Follow this tutorial by https://levelup.gitconnected.com/@haruelrovix
Create a boilerplate by running CRWNA. Install & link RNE & RVI. Make a basic home component, consisting of two input fields and one Submit button.

yarn web

Expected behaviour
web version to run

Desktop (please complete the following information):

  • OS: Ubuntu 16.04
  • Browser Chrome
  • Version 74.0.3729.108 (Official Build) (64-bit)

Smartphone (please complete the following information):
yarn android works fine

Additional context
This is my tutorial repo showing the guilty code…

I tried adding things to babel.config.js based on StackOverflow comments but without success

module.exports = function(api) {
  api.cache(true);
  return {
    presets: [
      ["module:metro-react-native-babel-preset"],
      ['react-app']
    ],
    ignore: [ "node_modules/art/core/color.js" ],
    plugins: [    
      ["module-resolver", {
        "alias": {
          "^react-native$": "react-native-web"
        }
      }],
      ['@babel/plugin-proposal-decorators', { legacy: true }],
      ['@babel/plugin-proposal-class-properties', { loose: true }],
      ['@babel/plugin-syntax-dynamic-import'],
      ['@babel/plugin-transform-regenerator'],  
      ['@babel/plugin-transform-runtime',
        {
          helpers: false,
          regenerator: true,
        },
      ]    
    ],
  };
};

#44 solved by @obiwankenoobi has similarities but somewhat beyond my limited programming experience...

I asked stack overflow question

Better documentation

Is your feature request related to a problem? Please describe.
Many users of the package encounter the same issues with es6/ios/android and since most of the advice are in the old closed issues, they either open a new issue or give up :(

Describe the solution you'd like
A few readme files for docs to explain these topics with link to from the main readme file:

  • Running native on emulator and devices (Xcode and Android Studio)
  • Testing
  • Troubleshooting - like an F.A.Q about the various issues the users encounter
  • Deployment - more how to build and less how to deploy to the various app stores
  • other suggestions are welcome

Describe alternatives you've considered
Would be nice to have a docs site with github pages but i would settle to start with readme files

Additional context
Common explanations about how to solve the new issues with Xcode and why we're not using the newest version of React Native. How to add es6 libraries to be compiled properly through webpack and others that react-native-web docs explain already

Could not resolve all files for configuration ':app:_internal_aapt2_binary'

Describe the bug
yarn android throws an error on Android Studio with gradle:3.2.1

To Reproduce
Steps to reproduce the behavior:

  1. Initialize CRNWA project
  2. Run yarn android
  3. Error
FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
> Could not find com.android.tools.build:aapt2:3.2.1-4818971.

To Fix
This project uses gradle 2.2.3

    classpath 'com.android.tools.build:gradle:2.2.3'

Simply add google repository and it should be fine.

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}

Profit

Hope it helps someone out there trying to get started with CRNWA. 🤝

Unable to use React Navigation

error
I created a web app using create-react-native-web-app. I need to navigate to login and registration screens from initial screen. I have installed react-navigation npm and imported stack navigator in my project. It fails to compile stating that 'You may need an appropriate loader to handle this file type.' Caught up with this error for the whole day. I have updated my webpack.config file, plugins, etc. Need help on fixing this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.