Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use addon in [email protected] #79

Open
adet4ever opened this issue Feb 8, 2020 · 4 comments
Open

Unable to use addon in [email protected] #79

adet4ever opened this issue Feb 8, 2020 · 4 comments

Comments

@adet4ever
Copy link

adet4ever commented Feb 8, 2020

Installation is fine however cannot load project as there is a error:

fullcalendar.js:1330 Uncaught TypeError: Cannot read property 'extend' of undefined
at Object. (fullcalendar.js:1330)
at webpack_require (fullcalendar.js:36)
at Object. (fullcalendar.js:4821)
at webpack_require (fullcalendar.js:36)
at Object. (fullcalendar.js:2046)
at webpack_require (fullcalendar.js:36)
at Object. (fullcalendar.js:14374)
at webpack_require (fullcalendar.js:36)
at fullcalendar.js:79
at fullcalendar.js:82

Inspecting the lines of code in fullcalendar.js, it seems like webpack_require(3) is missing. Any ideas how to resolve the issue would be appreciated.

Object.defineProperty(exports, "__esModule", { value: true });
var moment = __webpack_require__(0);
var $ = __webpack_require__(3);
var util_1 = __webpack_require__(4);
var ambigDateOfMonthRegex = /^\s*\d{4}-\d\d$/;
var ambigTimeOrZoneRegex = /^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/;
var newMomentProto = moment.fn; // where we will attach our new methods
exports.newMomentProto = newMomentProto;
var oldMomentProto = $.extend({}, newMomentProto); // copy of original moment methods
exports.oldMomentProto = oldMomentProto;
@aatauil
Copy link

aatauil commented Feb 3, 2021

@adet4ever Yes I had the same issue. It is because older versions of fullCalendar uses Jquery. So you basically need to enable jquery in your ember app. You can do this by going to the optional-features.json file in your root directory and changing Jquery-integration from false to true

optional-features.json:

{
  "application-template-wrapper": false,
  "default-async-observers": true,
  "jquery-integration": true,
  "template-only-glimmer-components": true
}

@yandiro
Copy link

yandiro commented Aug 6, 2021

Could anyone provide a link of a working ember-fullcalendar with ember 3, please?

Did @adet4ever or @aatauil got it working?

I can't import :
import dayGridPlugin from '@fullcalendar/daygrid';

@adet4ever
Copy link
Author

adet4ever commented Aug 6, 2021

@yandiro I was able to get it to work after. its been quite some time now so I cant remember the details. might be compatibility issues with the specific ember version.
my package.json file looks like this:


{
  "name": "web-ui",
  "version": "0.0.0",
  "private": true,
  "description": "Small description for web-ui goes here",
  "repository": "",
  "license": "MIT",
  "author": "",
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "scripts": {
    "build": "ember build",
    "lint:hbs": "ember-template-lint .",
    "lint:js": "eslint .",
    "start": "ember serve",
    "test": "ember test"
  },
  "devDependencies": {
    "@ember/jquery": "^1.1.0",
    "@ember/optional-features": "^1.3.0",
    "@fortawesome/ember-fontawesome": "^0.2.1",
    "@fortawesome/free-solid-svg-icons": "^5.12.0",
    "@glimmer/component": "^1.0.0",
    "@mariana-tek/ember-fullcalendar": "^1.0.1",
    "babel-eslint": "^10.0.3",
    "bootstrap": "^4.4.1",
    "broccoli-asset-rev": "^3.0.0",
    "ember-auto-import": "^1.5.3",
    "ember-autoresize": "^1.3.2",
    "ember-bootstrap": "^3.1.1",
    "ember-cli": "3.18.0-beta.1",
    "ember-cli-app-version": "^3.2.0",
    "ember-cli-babel": "^7.13.0",
    "ember-cli-dependency-checker": "^3.2.0",
    "ember-cli-deploy": "^1.0.2",
    "ember-cli-deploy-build": "^2.0.0",
    "ember-cli-deploy-display-revisions": "^1.0.1",
    "ember-cli-deploy-gzip": "^1.0.1",
    "ember-cli-deploy-revision-data": "^1.0.0",
    "ember-cli-deploy-s3": "^1.4.0",
    "ember-cli-deploy-s3-index": "^1.0.1",
    "ember-cli-eslint": "^5.1.0",
    "ember-cli-htmlbars": "^4.2.0",
    "ember-cli-inject-live-reload": "^2.0.1",
    "ember-cli-jsoneditor": "^0.2.0",
    "ember-cli-mirage": "^1.1.6",
    "ember-cli-moment-shim": "^3.7.1",
    "ember-cli-sass": "^10.0.1",
    "ember-cli-shims": "^1.2.0",
    "ember-cli-sri": "^2.1.1",
    "ember-cli-template-lint": "^1.0.0-beta.3",
    "ember-cli-uglify": "^3.0.0",
    "ember-cognito": "^0.10.0",
    "ember-data": "~3.15.0",
    "ember-export-application-global": "^2.0.1",
    "ember-fetch": "^7.0.0",
    "ember-flatpickr": "^2.15.4",
    "ember-load-initializers": "^2.1.1",
    "ember-maybe-import-regenerator": "^0.1.6",
    "ember-modal-dialog": "^3.0.0-beta.4",
    "ember-moment": "^7.3.0",
    "ember-qunit": "^4.6.0",
    "ember-resolver": "^7.0.0",
    "ember-simple-auth": "^2.1.1",
    "ember-source": "3.16.3",
    "ember-truth-helpers": "^2.1.0",
    "ember-uuid": "^2.1.0",
    "ember-welcome-page": "^4.0.0",
    "eslint-plugin-ember": "^7.7.1",
    "eslint-plugin-node": "^10.0.0",
    "faker": "^4.1.0",
    "jsoneditor": "^8.6.1",
    "loader.js": "^4.7.0",
    "qunit-dom": "^0.9.2",
    "sass": "^1.24.4"
  },
  "engines": {
    "node": "8.* || >= 10.*"
  },
  "ember": {
    "edition": "octane"
  },
  "dependencies": {
    "@fullcalendar/core": "^4.3.1",
    "@fullcalendar/daygrid": "^4.3.0",
    "@fullcalendar/interaction": "^4.4.0",
    "@fullcalendar/list": "^4.3.0",
    "@fullcalendar/timegrid": "^4.3.0",
    "ember-modifier": "^1.0.3",
    "inputmask": "^5.0.3"
  }
}

@yandiro
Copy link

yandiro commented Aug 9, 2021

Thanks a lot. Got it to work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants