I want to use the query-params feature in Ember. However, to do this, I need to download the canary version of ember. I am using bower for package management. How do I update my bower.json file in order to donwload latest canary version of Ember. Relevant parts of my bower.json file look as below:
{
"dependencies": {
"sass-bootstrap": "~2.3.0",
"requirejs": "~2.1.4",
"modernizr": "~2.6.2",
"jquery": "~1.9.1",
"requirejs-text": "~2.0.7",
"ember": "http://builds.emberjs.com/canary/ember.js",
"ember-prod": "http://builds.emberjs.com/canary/ember.prod.js",
"datatables": "~1.9.4",
"lodash": "~1.3.1",
"font-awesome": "~3.2.1",
"moment": "~2.1.0",
"d3": "~3.2.6",
"ember-model": "~0.0.7",
"jquery-ui": "~1.10.3",
"typeahead.js": "~0.10.1"
},
"devDependencies": {},
"resolutions": {
"jquery": ">=1.8.0",
}
}
However, "bower install ember" does not show me following:
Unable to find a suitable version for ember, please choose one:
1) ember#* which resolved to e-tag:8ee2c1ef5 and has ember-table-shim#0.2.0, nvwebapp as dependants
2) ember#~1.0 which resolved to 1.0.1 and has ember-model#0.0.11 as dependants
If I select the first resolution, and then go to app/bower_components/ember/index.js file, following can be seen at the top of the file:
/*!
* #overview Ember - JavaScript Application Framework
* #copyright Copyright 2011-2014 Tilde Inc. and contributors
* Portions Copyright 2006-2011 Strobe Inc.
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
* #license Licensed under MIT license
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
* #version 1.4.1+pre.af87bd20
*/
So, it seems that this is downloading version 1.4.1, however the latest canary version is 1.6.0.
How should I update my bower.json file to get the latest canary version?
Thanks in advance..!!
Source: http://www.ember-cli.com/user-guide/#using-canary-build-instead-of-release
Using canary build instead of release
In bower.json instead of a version number use:
"ember": "components/ember#canary",
And, following dependencies add resolutions:
"resolutions": {
"ember": "canary"
}
This can also be applied to Ember Data:
"ember-data": "components/ember-data#canary",
And, adding to resolutions:
"resolutions": {
"ember-data": "canary"
}
Wipe your vendor directory clean then run npm install && bower install.
You can enable the canary build by specifying just the build number, like this -
"ember": "1.4.0-beta.2"
I am using beta.2 for query params.
You also need to explicitly enable this feature.
Related
I have built a custom NodeJS module in C++, and I would like to use that in my electron app.
The module compilation using node-gyp works fine, and it copies the files in a dedicated directory. I can also install it by referring to the folder in my package.json file.
However, when I run the application, I get the following error:
(node:20800) UnhandledPromiseRejectionWarning: Error: The module '\?\D:\GitProjects\addon-test\local_node_modules\zeelicensenode\zeelicensenodejsaddon.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 93. This version of Node.js requires
NODE_MODULE_VERSION 103. Please try re-compiling or re-installing
The module is compiled on the same Windows machine I am running the application and has only one NodeJS version installed.
D:\GitProjects\addon-test> node --version
v16.13.2
As per the electron documentation, it uses a different ABI than the native NodeJS binary, so they suggest to build the module in a different way. Following that documentation, I updated the make.ps1 file of C++ module as follows:
make.ps1
$env:Path="$($env:APPDATA)\npm;$($env:Path)"
npm install -g node-gyp
node-gyp clean
node-gyp configure
$env:HOME="$($env:USERPROFILE)\.electron-gyp;$($env:HOME)"
node-gyp build --target=18.1.0 --arch=x64 --dist-url=https://atom.io/download/electron
copy -Verbose .\build\Release\zeelicensenodejsaddon.node .\dist
In my electron application, I have the following dependencies:
package.json
"dependencies": {
"#quasar/extras": "^1.0.0",
"core-js": "^3.6.5",
"quasar": "^2.0.0",
"vue": "^3.0.0",
"vue-router": "^4.0.0",
"zeelicensenodejs": "file:local_node_modules/zeelicensenode"
},
"devDependencies": {
"#quasar/app": "^3.0.0",
"electron": "^18.1.0",
"electron-rebuild": "^3.2.7"
}
The local_node_modules/zeelicensenode folder contains the declaration file, package.json file, zeelicensenodejsaddon.node file and a JS file that exports the module. The JS file has these lines:
const license = require('./zeelicensenodejsaddon');
module.exports = license;
NODE_MODULE_VERSION 103 refers to the current NodeJS version (18.x), but I do not understand where it is coming from. I have NodeJS 16.x installed on my machine, and as per the Electron's release information, Electron v18.1.0 also has NodeJS 16.x.
Is there anything I am missing to make this custom module work with Electron?
My team inherited an old (around 2017) ember.js based project, and we need to choose between remake the project with vue, or just upgrade ember version.
The project use node 6.16, and here are the dependencies :
// package.json
{
"version": "1.0.0",
"private": true,
"engines": {
"node": ">= 0.10.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.2.0",
"chart.js": "2.2.1",
"ember-ajax": "0.7.1",
"ember-browserify": "1.1.13",
"ember-cli": "2.4.2",
"ember-cli-app-version": "^1.0.0",
"ember-cli-autoprefixer": "0.6.0",
"ember-cli-babel": "^5.1.5",
"ember-cli-chart": "3.1.0",
"ember-cli-chartjs": "2.3.1",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars": "^1.3.5",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.10.2",
"ember-cli-moment-shim": "2.2.0",
"ember-cli-qunit": "^1.2.1",
"ember-cli-release": "0.2.8",
"ember-cli-sass": "5.3.0",
"ember-cli-spinjs": "1.0.8",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-cookies": "0.0.9",
"ember-data": "^2.18.5",
"ember-disable-proxy-controllers": "^1.0.2",
"ember-export-application-global": "^1.0.4",
"ember-load-initializers": "^0.5.0",
"ember-models-table": "1.11.0",
"ember-moment": "7.0.0-beta.3",
"ember-pikaday": "2.1.0",
"ember-power-select": "1.0.0-beta.14",
"ember-resolver": "^2.0.3",
"ember-rl-year-picker": "^0.2.0",
"liquid-fire": "0.24.0",
"loader.js": "^4.0.0",
"semantic-ui-ember": "2.0.0-beta.0"
},
"dependencies": {
"ember-colpick": "^0.6.2",
"findup": "^0.1.5",
"semantic-ui-icon": "^2.3.3"
}
}
// bower.json
{
"dependencies": {
"ember": "~2.7",
"ember-cli-shims": "0.1.0",
"ember-cli-test-loader": "0.2.2",
"ember-qunit-notifications": "0.1.0",
"hammerjs": "^2.0.6",
"matchMedia": "0.2.0",
"semantic-ui": "^2.2.4",
"chartjs": "2.1.6",
"spin.js": "^2.3.2",
"mjolnic-bootstrap-colorpicker": "^2.3.6",
"colpick": "2.0.2",
"pikaday": "^1.4.0"
},
"devDependencies": {
"js-cookie": "^2.1.2"
}
}
Yes the project use bower & npm, no idea why.
Knowing this, I got some questions :
Is this normal that ember-cli from npm has not the same version as ember from bower ?
Do you think it is even possible to upgrade ember from 2.7 (or 2.4.2??) to 3.28 (which is LTS) ?
We tried to use the famous ember update and ember-cli-update but it seems that our version (2.4.2) of ember-cli doesn't support it. We can't even find from which version this is supported.
If this is possible, then how ?
Is it possible to get rid of bower ? Before upgrading or after ?
The project is quite large, so we would like to avoid remaking it with vuejs.
And to answer the "why upgrading ember ?", well, node 6 is awful. We need at least node 12
every version is upgradable! But the safest way to do so is probably to traverse from LTS to LTS.
So, 2.4 -> 2.8 -> 2.12 -> 2.16 -> 2.18 -> 3.4 -> 3.8 -> 3.12 -> 3.16 > 3.20 -> 3.24 -> 3.28
More information about Releases here
That may sound like a lot of work, but it's why it's so important to keep up with upgrades. (It may not actually be that much work, depending on the size of your app, and how much you get distracted by new features)
The general strategy at each step is:
have a good test suite
loop:
ensure you have 0 deprecations being logged while running tests
upgrade all libraries to the highest they can go while supporting your version of ember (this'll require some spelunking, but thankfully, you don't have very many non-default deps)
upgrade your ember-source version to the next LTS
Getting off bower is a little non-standard though (in that it's a one-time thing), but there are some blog posts to help you out:
The 2x release blog posts: https://blog.emberjs.com/tag/version-2-x
The 3x release blog posts: https://blog.emberjs.com/tag/version-3-x
From reading the 2-x blog posts, I found this migration guide for getting off bower: https://github.com/ember-cli/ember-cli/releases/tag/v2.13.0-beta.1
I'd probably try to do this first, because you can do the nice upgrade loop described above
However, since you're thinking about re-writing in Vue, it may make sense to just re-write in Ember 4.2 instead -- since a lot of the concepts transfer (if you're not familiar with the latest ember, I cannot recommend the tutorial enough, as it's hard to top.
For a full list of features there is this app: https://upgrade.emberjs.com/changes?fromVersion=2.4&toVersion=4.2
(It says to run some commands, I wouldn't do either of those commands being as far back as 2.4)
For better support through you're upgrade, I recommend joining ember's discord server: https://discord.gg/emberjs
I am trying to update Doctrine Module in my Laminas project to version 3 using Composer but I am getting errors.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install doctrine/doctrine-orm-module 3.0.5
- Conclusion: don't install doctrine/doctrine-orm-module 3.0.4
- Conclusion: don't install doctrine/doctrine-orm-module 3.0.3
- Conclusion: don't install doctrine/doctrine-orm-module 3.0.2
- Conclusion: don't install doctrine/doctrine-orm-module 3.0.1
- Conclusion: remove doctrine/doctrine-module 2.1.10
- Installation request for doctrine/doctrine-orm-module ^3.0 -> satisfiable by doctrine/doctrine-orm-module[3.0.0, 3.0.1, 3.0.2,
3.0.3, 3.0.4, 3.0.5].
- Conclusion: don't install doctrine/doctrine-module 2.1.10
- doctrine/doctrine-orm-module 3.0.0 requires doctrine/doctrine-module ^4.0 -> satisfiable by doctrine/doctrine-module[4.0.0, 4.0.1, 4.0.2, 4.0.3].
- Can only install one of: doctrine/doctrine-module[4.0.0, 2.1.10].
- Can only install one of: doctrine/doctrine-module[4.0.1, 2.1.10].
- Can only install one of: doctrine/doctrine-module[4.0.2, 2.1.10].
- Can only install one of: doctrine/doctrine-module[4.0.3, 2.1.10].
- Installation request for doctrine/doctrine-module (locked at 2.1.10) -> satisfiable by doctrine/doctrine-module[2.1.10].
Installation failed, reverting ./composer.json to its original content.
Any ideas as to why doctrine-orm-module is not installing. I have tried uninstalling and re-installing doctrine-orm-module but with no luck.
Many thanks in advance.
Edit
composer.json
{
"name": "kryten/direct_sites",
"description": "Direct Sites",
"license": "",
"keywords": [
"framework",
"zf3",
"Ecommerce"
],
"homepage": "http://framework.zend.com/",
"require": {
"php": ">=7.3",
"laminas/laminas-component-installer": "^2.1",
"laminas/laminas-mvc": "^3.1",
"laminas/laminas-filter": "^2.9",
"laminas/laminas-crypt": "^3.3",
"laminas/laminas-mvc-plugin-flashmessenger": "^1.1",
"laminas/laminas-i18n": "^2.9",
"ocramius/proxy-manager": "^2.2",
"krytenuk/refresh-redirect": "^2.0",
"krytenuk/logger": "^2.0",
"krytenuk/recaptchav2": "^2.0",
"krytenuk/mailchimp": "^0.2.0",
"laminas/laminas-serializer": "^2.9",
"laminas/laminas-mvc-i18n": "^1.1",
"gedmo/doctrine-extensions": "^2.4",
"laminas/laminas-permissions-acl": "^2.7",
"laminas/laminas-navigation": "^2.9",
"laminas/laminas-cache": "^2.8",
"ocramius/package-versions": "^1.4",
"laminas/laminas-feed": "^2.12",
"symfony/filesystem": "^4.2",
"laminas/laminas-dependency-plugin": "^1.0",
"krytenuk/messenger": "^1.1",
"laminas/laminas-file": "^2.8",
"doctrine/doctrine-orm-module": "2.1"
},
"autoload": {
"psr-4": {
"Application\\": "module/Application/src/",
"Auth\\": "module/Auth/src/",
"Admin\\": "module/Admin/src/",
"Author\\": "module/Author/src/",
"User\\": "module/User/src/"
}
}
}
I am trying to run the command composer require doctrine/doctrine-orm-module and I get the response Using version ^3.0 for doctrine/doctrine-orm-module followed by the message above.
Try cleaning up the vendor/ directory as it might contain the too old version of doctrine/doctrine-module installed previously.
As another solution, I suggest you execute composer update and see if there are any errors.
Usually, in such cases the most common problem is that composer require ... does not upgrade the existing packages.
My Expo project requires the latest version of react-native-svg library to render my SVGs correctly. Currently it's version 9.3.5
From package-json.lock, I see that my current Expo SDK 32 has version 8.0.10 listed.
"dependencies": {
"react-native-svg": {
"version": "8.0.10",
"resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-8.0.10.tgz",
"integrity": "sha512-gsG5GUdvlox67+ohLnq3tZSqiYBmz4M5lKKeUfnJZ8EPrMMS5ZgaVj7Zcccee1VvINS5xQaoenUJdha/GEo34w==",
"requires": {
"color": "^2.0.1",
"lodash": "^4.16.6",
"pegjs": "^0.10.0"
}
}
}
I have tried just installing latest react-native-svg alongside Expo by using
npm install react-native-svg#9.3.5
However, when running the app I get an error:
Tried to register two views with the same name RNSVGRect
So how can I force Expo to use the latest version? I don't see any react-native-svg dependencies anywhere and changing the package-lock.json directly doesn't seem like a good idea.
Short answer to my question is: you can't. At least not without some ugly hacks that are more trouble than they're worth.
The good news is that SDK 33 now comes with "react-native-svg": "~9.4.0" as a dependency and this is almost the latest version as of this writing.
Anyone please help me with Ember update.My current code base was 2.14.2 and I try to update 2.18.2.And I got the below error.
Could not start watchman
Visit https://ember-cli.com/user-guide/#watchman for more info.
Cannot find module
'/sampleApp/bower_components/ember/ember-template-compiler.js'
Anyone, please guide me with this. If you have another method to upgrade the version of ember please let me know or please help to solve the issue.
Update
Full stack track:
Log File Source
`ENV Summary:
ERROR Summary:
- broccoliBuilderErrorStack: [undefined]
- code: MODULE_NOT_FOUND
- codeFrame: [undefined]
- errorMessage: Cannot find module
'/Users/mariselvan/Documents/sampleApp/bower_components/ember/ember-
template-compiler.js'
- errorType: [undefined]
- location:
- column: [undefined]
- file: [undefined]
- line: [undefined]
- message: Cannot find module
'/Users/mariselvan/Documents/sampleApp/bower_components/ember/ember-
template-compiler.js'
- name: Error
- nodeAnnotation: [undefined]
- nodeName: [undefined]
- originalErrorMessage: [undefined]
- stack: Error: Cannot find module
'/Users/mariselvan/Documents/sampleApp/bower_components/ember/ember-
template-compiler.js'
at Function.Module._resolveFilename
(internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Class.htmlbarsOptions (/Users/mariselvan/Documents/sampleApp/node_modules/ember-inplace-edit/node_modules/ember-cli-htmlbars/ember-addon-main.js:78:25)
at Object.toTree (/Users/mariselvan/Documents/sampleApp/node_modules/ember-inplace-edit/node_modules/ember-cli-htmlbars/ember-addon-main.js:31:36)
at /Users/mariselvan/Documents/sampleApp/node_modules/ember-cli-preprocess-registry/preprocessors.js:180:26
at Array.forEach (<anonymous>)
at processPlugins (/Users/mariselvan/Documents/sampleApp/node_modules/ember-cli-preprocess-registry/preprocessors.js:178:11)
at module.exports.preprocessTemplates (/Users/mariselvan/Documents/sampleApp/node_modules/ember-cli-preprocess-registry/preprocessors.js:161:10)
=================================================================================
Ember-Cli version of the project :
ember-cli: 2.14.2
node: 10.13.0
os: darwin x64
Thanks in advance.
I remember experiencing something like this around the late 2.x of ember. Basically, ember switched from bower to npm around 2.11 or so.
Are you using the ember-source npm version of ember? Your template compiler lookup is searching within bower which is most likely wrong if you've properly made the switch to npm, which you should have!
There's this issue that was fixed which may be the cause for you. Often times, updating the ember
version alone isn't enough. For me, it was always easiest to update to the ember-cli version whose blueprint installed the version of ember that you are wanting (which will help you know what other core dependencies need updating). Looking through old release notes helps here.
If you are using an old ember-cli-htmlbars-inline-precompiler, you need to upgrade to:
"ember-cli-htmlbars-inline-precompile": "^0.3.6"
If it's not either of those, please update your question with the full stack trace and the ember-cli version
EDIT: I'd like to help enable you to solve this issue yourself in the future so here's the detailed breakdown of how I reach my conclusion. In your stack trace, we see:
/Users/mariselvan/Documents/sampleApp/bower_components/ember/ember-
template-compiler.js
This is looking for ember in bower which is no longer the case since you have ember-source in your package.json. This error results from
at Class.htmlbarsOptions (/Users/mariselvan/Documents/sampleApp/node_modules/ember-inplace-edit/node_modules/ember-cli-htmlbars/ember-addon-main.js:78:25)
So the conclusion here is that the version of ember-inplace-edit is old and you need to upgrade or fix yourself. Look at this addon's package.json and it's got this fixed dependency:
"dependencies": {
"ember-cli-babel": "^5.1.3",
"ember-cli-htmlbars": "0.7.9" // this was released Jun 12, 2015
}
For the record, my ember 2.18 app bundled "ember-cli-htmlbars": "^2.0.1" by default. So lets go to the release of 0.7.9, download the source code, and look at the offending line in :
templateCompilerPath: function() {
var config = this.projectConfig();
var templateCompilerPath = config['ember-cli-htmlbars'] && config['ember-cli-htmlbars'].templateCompilerPath;
if (!templateCompilerPath) {
// THIS ONLY WORKS FOR BOWER VERSIONS OF EMBER
templateCompilerPath = this.project.bowerDirectory + '/ember/ember-template-compiler';
}
return path.resolve(this.project.root, templateCompilerPath);
}
So you have a couple of reasonable options
Fix the addon and make it support later Ember versions and open a PR to get merged upstream (by updating this ember cli htmlbars dependency)
Fork the addon and fix it without merging upstream and point to your fork
Remove the addon and rework this part of your application
use the templateCompilerPath option to point to your ember-source version (but this is honestly the worst option)