ember-cli-update icon indicating copy to clipboard operation
ember-cli-update copied to clipboard

ember-cli-update creates new app in /tmp

Open tommytomtj opened this issue 4 years ago • 18 comments

Running ember-cli-update within an existing app creates a new app inside /tmp instead. Here is the output:

installing app
Ember CLI v3.17.0

Creating a new Ember app in /tmp/tmp-7917c6mBjlmacDJS/ui:
installing app
Ember CLI v3.17.0

Creating a new Ember app in /tmp/tmp-7917ZQ0Uw6FQX72J/ui:
  create .editorconfig
  create .ember-cli
  create .eslintignore
  create .eslintrc.js
  create .template-lintrc.js
  create .travis.yml
  create .watchmanconfig
  create README.md
  create app/app.js
  create app/components/.gitkeep
  create app/controllers/.gitkeep
  create app/helpers/.gitkeep
  create app/index.html
  create app/models/.gitkeep
  create app/router.js
  create app/routes/.gitkeep
  create app/styles/app.css
  create app/templates/application.hbs
  create config/environment.js
  create config/optional-features.json
  create config/targets.js
  create ember-cli-build.js
  create .gitignore
  create package.json
  create public/robots.txt
  create testem.js
  create tests/helpers/.gitkeep
  create tests/index.html
  create tests/integration/.gitkeep
  create tests/test-helper.js
  create tests/unit/.gitkeep
  create vendor/.gitkeep

Successfully created project ui.
Get started by typing:

  $ cd ui
  $ npm start

Happy coding!

The original package.json looks like so:

{
  "name": "swd-ui",
  "version": "0.0.0",
  "private": true,
  "description": "Small description for swd-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/optional-features": "^1.0.0",
    "babel-eslint": "^10.0.3",
    "broccoli-asset-rev": "^3.0.0",
    "ember-cli": "~3.13.1",
    "ember-cli-app-version": "^3.2.0",
    "ember-cli-babel": "^7.11.1",
    "ember-cli-dependency-checker": "^3.1.0",
    "ember-cli-eslint": "^5.1.0",
    "ember-cli-htmlbars": "^4.0.0",
    "ember-cli-htmlbars-inline-precompile": "^3.0.0",
    "ember-cli-inject-live-reload": "^2.0.1",
    "ember-cli-sri": "^2.1.1",
    "ember-cli-template-lint": "^1.0.0-beta.3",
    "ember-cli-uglify": "^3.0.0",
    "ember-data": "~3.13.0",
    "ember-export-application-global": "^2.0.0",
    "ember-fetch": "^6.7.0",
    "ember-load-initializers": "^2.1.0",
    "ember-maybe-import-regenerator": "^0.1.6",
    "ember-qunit": "^4.5.1",
    "ember-resolver": "^5.3.0",
    "ember-source": "~3.13.0",
    "ember-welcome-page": "^4.0.0",
    "eslint-plugin-ember": "^7.1.0",
    "eslint-plugin-node": "^10.0.0",
    "loader.js": "^4.7.0",
    "qunit-dom": "^0.9.0"
  },
  "engines": {
    "node": "8.* || >= 10.*"
  }
}

Versions of libraries: npm 6.13.4 ember-cli: 3.17.0 node: 12.16.1

tommytomtj avatar Apr 15 '20 19:04 tommytomtj

Note that it looks like things still work, other than printing out some extra output and not cleaning up temp files. FWIW, I am seeing this on Windows (10 Pro 64-bit) using GIt Bash (MSYS -- though also saw with cmd.exe).

Reproduction steps:

  1. npm install --global [email protected] (not sure if it matters which version is used)
  2. ember new junk-app
  3. cd junk-app
  4. DEBUG=* npx [email protected] 2> ../debug.txt (behaves the same when run via npm install --global ember-cli-update installation) Debug log output is here debug.txt
  5. Observe extra output from ember new (as OP mentioned)
  6. Observe that temporary files are still present, e.g. dir "C:\Users\jacob\AppData\Local\Temp\tmp-26556qKis4AylDZJd\junk-app"

jacobq avatar Apr 17 '20 13:04 jacobq

I'm having the same issue when globally or locally installed.

ember-cli: 3.15.2 node: 12.16.2 os: win32 x64 (Windows 10) npm: 6.9.0

NicholasJohn16 avatar Apr 24 '20 05:04 NicholasJohn16

I have this issue too using Mint Linux and trying to update from 3.15.0 to 3.16.2.

danr1979 avatar Jun 22 '20 09:06 danr1979

Same issue on OSX, nothing in the actual project changed.

Edit: Appears it erred because I specified 3.20.4 (which is a valid ember version), but no matching ember-cli version. Would be nice if the tool would fall back to the next closest version (3.20.0 of ember-cli in this case).

Samsinite avatar Aug 28 '20 18:08 Samsinite

I am stuck with the same issue in macOS, when i ran the command ember-cli-update --to 3.24.0

Versions: npm - 6.14.8 ember-cli: 3.16.0 node: 12.18.0

vishnubalajikm avatar Jul 26 '21 10:07 vishnubalajikm

@vishnubalajikm It sounds like you might have uncommitted changes in your project. Commit or stash all of your changes to your project files before running the update so you have a clean working directory. Once you've done that run the update again and you should see new changes to your project files from the updater & your Ember version will be properly updated. Then either run ember-cli-update --run-codemods or if you want to skip that, run either yarn or npm install before starting your app.

ewilloughby avatar Aug 17 '21 18:08 ewilloughby

Same issue here when trying to upgrade to 3.28.0. No uncommited changes in the repository

npm 6.14.10 node v14.15.4 ember-cli-update 1.0.0 global package MacOS

staffe avatar Sep 03 '21 12:09 staffe

Same here any update on this

node v12.22.1 npm 6.14.12 ember-cli-update 1.0.1 global MacOS

pabloascarza avatar Jun 13 '22 12:06 pabloascarza

I can see this issue has the highest priority from the ember-cli-update team. I've come to expect this from Ember.

Seeing as Ember 3 is reaching end-of-life support in 1/2023, maybe someone will get right on this in the next 12-18 months.

CodePolymath avatar Jul 28 '22 23:07 CodePolymath

Same error here! node: v12.14.0 npm: v8.3.2 global [email protected] Windows 11 (64-bit)

rami-alloush avatar Oct 05 '22 00:10 rami-alloush

@rami-alloush Did you figure this out? I am having the same problem with upgrading versions in 3x. node: 12.22.12 npm: 8.19.12 global [email protected] Windows 11 (64-bit)

Filoteemo avatar Apr 12 '23 11:04 Filoteemo

Same Problem for me , on Win10 . Sometimes works at my HomePC but 90% of the time at my Work-Laptop its not working = making new app in a temp-dir but NOT changing anything in actual project. Very annoying!

ember-cli: 4.8.0 node: 18.17.1 os: win32 x64

  • Workaround: copy the contents at root-dir of temp-dir over the project dir, but one has to do the MERGE manually (git etc).

PS: But still : thx for your comments. So we are not alone with the problem. Output looks like this

ember-cli-update --to 4.8.0
? Blueprint updates have been found. Which one would you like to update? app, current: 4.4.1, latest: 5.2.1
installing app
Ember CLI v4.8.0

Creating a new Ember app in C:\Users\cbrel\AppData\Local\Temp\tmp-29856-wYw6ZywpdvbR\vrdoro:
  create .editorconfig
  create .ember-cli
  create .eslintignore
  create .eslintrc.js
  create .github\workflows\ci.yml
  create .prettierignore
  create .prettierrc.js
  create .template-lintrc.js
  create .watchmanconfig
  create README.md
  create app\app.js
  create app\components\.gitkeep
  create app\controllers\.gitkeep
  create app\helpers\.gitkeep
  create app\index.html
  create app\models\.gitkeep
  create app\router.js
  create app\routes\.gitkeep
  create app\styles\app.css
  create app\templates\application.hbs
  create config\ember-cli-update.json
  create config\environment.js
  create config\optional-features.json
  create config\targets.js
  create ember-cli-build.js
  create .gitignore
  create package.json
  create public\robots.txt
  create testem.js
  create tests\helpers\index.js
  create tests\index.html
  create tests\integration\.gitkeep
  create tests\test-helper.js
  create tests\unit\.gitkeep
  create vendor\.gitkeep

Successfully created project vrdoro.
Get started by typing:

  $ cd vrdoro
  $ npm start

Happy coding!
WARNING: Node v18.17.1 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details.
installing app
Ember CLI v4.4.1

Creating a new Ember app in C:\Users\cbrel\AppData\Local\Temp\tmp-29856-xb3RRfPGe0xw\vrdoro:
  create .editorconfig
  create .ember-cli
  create .eslintignore
  create .eslintrc.js
  create .github\workflows\ci.yml
  create .prettierignore
  create .prettierrc.js
  create .template-lintrc.js
  create .watchmanconfig
  create README.md
  create app\app.js
  create app\components\.gitkeep
  create app\controllers\.gitkeep
  create app\helpers\.gitkeep
  create app\index.html
  create app\models\.gitkeep
  create app\router.js
  create app\routes\.gitkeep
  create app\styles\app.css
  create app\templates\application.hbs
  create config\ember-cli-update.json
  create config\environment.js
  create config\optional-features.json
  create config\targets.js
  create ember-cli-build.js
  create .gitignore
  create package.json
  create public\robots.txt
  create testem.js
  create tests\helpers\index.js
  create tests\index.html
  create tests\integration\.gitkeep
  create tests\test-helper.js
  create tests\unit\.gitkeep
  create vendor\.gitkeep

Successfully created project vrdoro.
Get started by typing:

  $ cd vrdoro
  $ npm start

Happy coding!
You must start with a clean working directory

CarlosHellsing avatar Aug 29 '23 09:08 CarlosHellsing

Hey 👋 it seems like it's not actually doing the final step for you 🤔 the way that this is supposed to work is that it generates the "from" app and the "too" app, creates a diff between those two and then applies that diff to your local app.

It seems like something in that last step is stalling for you and not throwing an error 🤔 I'm currently working on getting CI working again for this project and I know that it should be working on windows, but keep an eye on releases after https://github.com/ember-cli/ember-cli-update/pull/1243 is merged and you can try it again 👍

mansona avatar Aug 29 '23 11:08 mansona

@CarlosHellsing and anyone else experiencing this issue. The fix for me was to not specify version when doing the update. When applying --to [versionnumber] a new app was created so I just removed this argument. Ember-cli-update would then recognize the current working version and climb one minor-release at a time. Remember to commit any changes before doing the update. Hope this helps.

Filoteemo avatar Aug 29 '23 12:08 Filoteemo

Same issure here :(

EDIT: Actually got it working. Thought you only had to ensure there where no uncommitted changes, but untracked files also needs to be removed, so you have completely clean repo.

gnucifer avatar Sep 27 '23 14:09 gnucifer

@gnucifer did it not error with something saying "you need to run this on a clean repo" or anything?

mansona avatar Sep 28 '23 14:09 mansona

@mansona It did, and I eventually spotted it, but it's a very discrete text at the bottom with large amounts of output above and nothing else really indicating an error occurred:

...
Successfully created project myapp.
Get started by typing:

  $ cd myapp
  $ npm start

Happy coding!
You must start with a clean working directory

The command even returns a zero exit status as far as I can see. It would have been nice if ember-cli-update checked if the repo is unclean even before creating the reference app, and bail out with a more visible error message.

gnucifer avatar Sep 29 '23 12:09 gnucifer

Same here any update?

Screenshot 2024-01-10 at 17 12 39

antepenavasyfl avatar Jan 10 '24 17:01 antepenavasyfl