btecu / ember-cli-bootstrap-datetimepicker

Ember date time picker addon
MIT License
20 stars 51 forks source link

Upgrade to 0.6.0 issue #45

Closed eharrow closed 6 years ago

eharrow commented 7 years ago

I don't know how ember really builds things but have tried to update to 0.6.0 and hit an issue on ember serve:

Warning: ignoring input sourcemap for vendor/ember/ember.debug.js because ENOENT: no such file or directory, open '/Users/ewan/git/ember-app/tmp/source_map_concat-input_base_path-b84lOJ04.tmp/vendor/ember/ember.debug.map'
The Broccoli Plugin: [BroccoliMergeTrees: TreeMerger (vendor & appJS)] failed with:
Error: ENOENT: no such file or directory, open '/Users/ewan/git/ember-app/tmp/source_map_concat-input_base_path-b84lOJ04.tmp/node_modules/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js'
    at Object.fs.openSync (fs.js:653:18)
    at Object.fs.readFileSync (fs.js:554:33)
    at SourceMap.addFile (/Users/ewan/git/ember-app/node_modules/fast-sourcemap-concat/lib/source-map.js:75:31)
    at /Users/ewan/git/ember-app/node_modules/broccoli-concat/concat.js:200:16
    at Array.forEach (<anonymous>)
    at Concat.<anonymous> (/Users/ewan/git/ember-app/node_modules/broccoli-concat/concat.js:198:24)
    at /Users/ewan/git/ember-app/node_modules/fast-sourcemap-concat/lib/source-map.js:399:12
    at initializePromise (/Users/ewan/git/ember-app/node_modules/rsvp/dist/rsvp.js:567:5)
    at new Promise (/Users/ewan/git/ember-app/node_modules/rsvp/dist/rsvp.js:1039:33)
    at SourceMap.end (/Users/ewan/git/ember-app/node_modules/fast-sourcemap-concat/lib/source-map.js:386:10)

The broccoli plugin was instantiated at: 
    at BroccoliMergeTrees.Plugin (/Users/ewan/git/ember-app/node_modules/broccoli-plugin/index.js:7:31)
    at new BroccoliMergeTrees (/Users/ewan/git/ember-app/node_modules/ember-cli/node_modules/broccoli-merge-trees/index.js:16:10)
    at Function.BroccoliMergeTrees [as _upstreamMergeTrees] (/Users/ewan/git/ember-app/node_modules/ember-cli/node_modules/broccoli-merge-trees/index.js:10:53)
    at mergeTrees (/Users/ewan/git/ember-app/node_modules/ember-cli/lib/broccoli/merge-trees.js:85:33)
    at EmberApp._mergeTrees (/Users/ewan/git/ember-app/node_modules/ember-cli/lib/broccoli/ember-app.js:1815:12)
    at EmberApp.javascript (/Users/ewan/git/ember-app/node_modules/ember-cli/lib/broccoli/ember-app.js:1297:17)
    at EmberApp.toArray (/Users/ewan/git/ember-app/node_modules/ember-cli/lib/broccoli/ember-app.js:1672:12)
    at EmberApp.toTree (/Users/ewan/git/ember-app/node_modules/ember-cli/lib/broccoli/ember-app.js:1694:38)
    at module.exports (/Users/ewan/git/ember-app/ember-cli-build.js:34:14)
    at Builder.setupBroccoliBuilder (/Users/ewan/git/ember-app/node_modules/ember-cli/lib/models/builder.js:56:19)

Working deps:

    "auto-changelog": "^0.3.1",
    "broccoli-asset-rev": "^2.4.5",
    "ember-ajax": "^3.0.0",
    "ember-c3": "^0.3.1",
    "ember-c3-shim": "^0.0.7",
    "ember-cli": "~2.14.0",
    "ember-cli-app-version": "^3.0.0",
    "ember-cli-babel": "^6.3.0",
    "ember-cli-bootstrap-datetimepicker": "^0.5.0",
    "ember-cli-bootstrap-sassy": "^0.5.6",
    "ember-cli-bootstrap3-popover": "^1.0.3",
    "ember-cli-clipboard": "^0.8.0",
    "ember-cli-dependency-checker": "^1.3.0",
    "ember-cli-eslint": "^3.0.0",
    "ember-cli-flash": "^1.4.3",
    "ember-cli-geo": "^4.0.0",
    "ember-cli-htmlbars": "^2.0.1",
    "ember-cli-htmlbars-inline-precompile": "^0.4.3",
    "ember-cli-inject-live-reload": "^1.4.1",
    "ember-cli-moment-shim": "^3.3.0",
    "ember-cli-qunit": "^4.0.0",
    "ember-cli-sass": "^6.1.3",
    "ember-cli-shims": "^1.1.0",
    "ember-cli-sri": "^2.1.0",
    "ember-cli-string-helpers": "^1.4.0",
    "ember-concurrency": "^0.8.10",
    "ember-d3": "^0.2.0",
    "ember-data": "~2.14.10",
    "ember-data-model-fragments": "^2.14.0",
    "ember-export-application-global": "^2.0.0",
    "ember-font-awesome": "^3.0.5",
    "ember-i18n": "^5.0.2",
    "ember-leaflet": "^3.0.12",
    "ember-load-initializers": "^1.0.0",
    "ember-power-select": "^1.9.6",
    "ember-radio-button": "^1.1.1",
    "ember-resolver": "^4.0.0",
    "ember-route-action-helper": "^2.0.5",
    "ember-scroll-to": "^0.6.4",
    "ember-select": "^0.3.0",
    "ember-source": "~2.14.0",
    "ember-string-helpers": "^1.0.1",
    "ember-truth-helpers": "^1.3.0",
    "ember-welcome-page": "^3.0.0",
    "eonasdan-bootstrap-datetimepicker-npm": "4.17.42",
    "eslint-plugin-ember": "^4.1.2",
    "git-changelog": "^1.1.2",
    "leaflet": "^1.0.0",
    "loader.js": "^4.2.3"
  },

package.json diff after upgrade that does not work (see error above):

index a00a7bf..7fc13c1 100644
--- a/package.json
+++ b/package.json
@@ -27,7 +27,7 @@
     "ember-cli": "~2.14.0",
     "ember-cli-app-version": "^3.0.0",
     "ember-cli-babel": "^6.3.0",
-    "ember-cli-bootstrap-datetimepicker": "^0.5.0",
+    "ember-cli-bootstrap-datetimepicker": "^0.6.0",
     "ember-cli-bootstrap-sassy": "^0.5.6",
     "ember-cli-bootstrap3-popover": "^1.0.3",
     "ember-cli-clipboard": "^0.8.0",
@@ -38,7 +38,7 @@
     "ember-cli-htmlbars": "^2.0.1",
     "ember-cli-htmlbars-inline-precompile": "^0.4.3",
     "ember-cli-inject-live-reload": "^1.4.1",
-    "ember-cli-moment-shim": "^3.3.0",
+    "ember-cli-moment-shim": "3.5.0",
     "ember-cli-qunit": "^4.0.0",
     "ember-cli-sass": "^6.1.3",
     "ember-cli-shims": "^1.1.0",
@@ -67,7 +67,9 @@
     "eslint-plugin-ember": "^4.1.2",
     "git-changelog": "^1.1.2",
     "leaflet": "^1.0.0",
-    "loader.js": "^4.2.3"
+    "loader.js": "^4.2.3",
+    "moment": "^2.19.1",
+    "moment-timezone": "^0.5.13"
   },
   "engines": {
     "node": "^4.5 || 6.* || >= 7.*"
btecu commented 7 years ago

I should have put a note. Version 0.6.0 and up requires ember-cli 2.15.0 and up because of how it imports the library.

You can see here https://github.com/btecu/ember-cli-bootstrap-datetimepicker/commit/8e9736318b4ceacc32e70453b086abdd227fe106#diff-168726dbe96b3ce427e7fedce31bb0bcL15 that it's much simpler to import the library, leveraging a newer ember-cli feature.

Also, you can now remove "eonasdan-bootstrap-datetimepicker-npm": "4.17.42", from your package.json.

btecu commented 6 years ago

Let me know if this is still an issue.