Giter VIP home page Giter VIP logo

Comments (4)

acro5piano avatar acro5piano commented on June 12, 2024

Hmm that's strange. I haven't build it with Windows (Linux/OSX only) so there must be something I am missing. Could you find issues with Rollbar related to Windows?

By the way, the index.js which is built with Linux looks like this:

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var dayjs = require('dayjs');
var React = require('react');
var reactNative = require('react-native');
var isBetween = require('dayjs/plugin/isBetween');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
var isBetween__default = /*#__PURE__*/_interopDefaultLegacy(isBetween);

var __assign = function() {
    __assign = Object.assign || function __assign(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};

var Color;
(function (Color) {
    Color["primary"] = "rgb(66, 133, 244)";
    Color["red"] = "#C80B22";
    Color["yellow"] = "#F8E71C";
    Color["green"] = "#4AC001";
    Color["orange"] = "#E26245";
    Color["pink"] = "#5934C7";
})(Color || (Color = {}));

var MIN_HEIGHT = 1200;
var HOUR_GUIDE_WIDTH = 50;

// ....

from react-native-big-calendar.

Gilad-Shnoor avatar Gilad-Shnoor commented on June 12, 2024

I did some digging and figured out that the build was failing because it was using bash commands that windows doesn't recognize so I started converting the package.json to a more cross platform version using "run-script-os".

My package.json is now:

{
  "name": "react-native-big-calendar",
  "version": "0.6.0",
  "main": "build/index.js",
  "jsnext:main": "build/index.es.js",
  "module": "build/index.es.js",
  "types": "build/index.d.ts",
  "repository": "[email protected]:llotheo/react-native-big-calendar",
  "author": "gosho-kazuya <[email protected]>",
  "license": "MIT",
  "scripts": {
    "storybook": "start-storybook -p 7007",
    "build-storybook": "build-storybook -o .storybook-build",
    "sync-ios":"run-script-os",
    "sync-ios:defult": "yarn build && cp -r build rndemo",
    "sync-ios:windows" : "yarn build&&xcopy /s /y build rndemo",
    "start-ios": "yarn sync-ios && cd rndemo && yarn ios",
    "test": "jest",
    "lint": "tslint src/*.{ts,tsx}",
    "lint:fix": "yarn lint --fix",
    "watch": "rollup -cw",
    "prepublish": "npm run build",
    "build": "npm-run-all build:clean build:ts",
    "build:clean":"run-script-os",
    "build:clean:default": "rm -rf build/",
    "build:clean:windows" : "if exist build rmdir /s /q build",
    "build:ts": "run-script-os",
    "build:ts:default": "env NODE_ENV=production rollup -c",
    "build:ts:windows": "SET NODE_ENV=production&&rollup -c",
    "ahh": "rollup -c"
  },
  "dependencies": {
    "dayjs": "^1.9.1"
  },
  "peerDependencies": {
    "react": "^16.8.3",
    "react-native": "^0.59.0"
  },
  "devDependencies": {
    "@babel/core": "^7.11.6",
    "@rollup/plugin-typescript": "^6.0.0",
    "@storybook/react": "^6.0.26",
    "@types/jest": "^26.0.14",
    "@types/node": "^14.11.8",
    "@types/react-native": "^0.63.25",
    "acorn-jsx": "^5.3.1",
    "babel-loader": "^8.1.0",
    "husky": "^4.3.0",
    "jest": "^25.5.4",
    "lint-staged": "^10.4.0",
    "npm-run-all": "^4.1.5",
    "prettier": "^2.1.2",
    "react-native": "^0.63.2",
    "react-native-web": "^0.13.14",
    "rollup": "^2.29.0",
    "rollup-plugin-typescript2": "^0.27.3",
    "run-script-os": "^1.1.1",
    "ts-jest": "^25.5.1",
    "ts-loader": "^8.0.4",
    "tslib": "^2.0.3",
    "tslint": "^6.1.3",
    "typescript": "^3.9.7",
    "webpack-merge": "^5.2.0"
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.{ts,tsx,js,jsx,md}": [
      "prettier --write",
      "tslint --fix"
    ]
  }
}

But I still get the same index.js that's trying to import a .tsx file

from react-native-big-calendar.

acro5piano avatar acro5piano commented on June 12, 2024

Please upgrade react-native to the latest version.

from react-native-big-calendar.

acro5piano avatar acro5piano commented on June 12, 2024

I think this is related to Windows. We don't support it as a build machine.

from react-native-big-calendar.

Related Issues (20)

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.