Not able to install ember-truth-helpers

When I ran this: ember install ember-truth-helpers on VS code prompt, I am getting error as below: ember : The term ‘ember’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + ember install ember-truth-helpers + ~~~~~ + CategoryInfo : ObjectNotFound: (ember:String) , CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

when I run: npm run ember install ember-truth-helpers “npm ERR! missing script: ember npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\aaleem\AppData\Roaming\npm-cache_logs\2019-11-08T19_59_21_183Z-debug.log”

And when I ran this command: yarn run ember install ember-truth-helpers I got the following error “yarn run v1.19.0 error Command “ember” not found. info Visit yarnpkg.com/en/docs/cli/run for documentation about this command” - any help please

I am not even sure even I am using EmberCLI or something else, even running ember version command is also not working saying that the ember command is not recognized - please need help.

I am really stuck in this, neither helper functions that I am creating are working nor these above libraries are working - anybody can please help me, I am not even being informed by ember what am I missing - any help would be much much helpful - thanks

I’m not positive but from the symptoms you probably need to do at least this:

npm install --global ember-cli 

Then you need to make sure you’re in an Ember project before ember install will work. You can create a project with ember new.

You may find the guides helpful, as they’ll cover all of this and much more!

1 Like

I’m not sure if it’s web pack or ember cli yes this is first time I’m working on ember application.

One more thing is this project is given to me on maintenance. So not able to run the ember-cli commands on visual studio code. So need help please. But the ember application is running page loading but ember install etc commands aren’t working. When I run ./watch, all will be loaded into another visual studio web app as JavaScript and application runs nicely, ember commands for installation etc isn’t working. Any help please thanks a lot please.

  1. You need to run the command I gave you above.
  2. Beyond that, unfortunately, it’s going to be very difficult for anyone to help you without working directly on your app. :frowning:
1 Like

Like pointed out, you need to have Ember CLI installed globally to run commands using ember command. One other thing that you can do, is to use the downloaded version by running ./node_modules/.bin/ember.

Have in mind that ember install is more or less doing yarn add --dev, so you can use that as well.

1 Like

00001

I have the folder structure like the below, any help please? I don’t have Ember app file in it to run, any help please.

And main folder structure is as below, any help please, I am really struggling.00002

Any help please - thank you, none of the helper functions are working except the Ember builtin ones - really need help - thank you.

I am more comfortable to run npm over yarn, is there any npm equivalent for the above and even after installation my ember script is not able to recognize those helper functions - any help please - thank you.

I ran this command as in the below quote

[quote=“mupkoo, post:6, topic:17200”] yarn add install ember-truth-helpers --dev [/quote] Then after that when I ran the ./watch command, it asked me that it wants to install the Ember Web pack and then it started giving me errors as in below figure - any help please - its giving me hard time and it seems its impacting the dead lines too - need help please

And I am getting the following error: [OperationalError: EPERM: operation not permitted, rename ‘C:\SourceCode\IMS\Development\IMS\IMS.Ember\node_modules\sparkles\package.json.2915287916’ → ‘C:\SourceCode\IMS\Development\IMS\IMS.Ember\node_modules\sparkles\package.json’] {

Any help depending upon this error why is it happening

Then I ran the following command: npm link webpack Now it is better, but now still I am getting error, a different one but still getting the error: “gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\aaleem\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:210:5) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Windows_NT 10.0.17134 gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\aaleem\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “rebuild” gyp ERR! cwd C:\SourceCode\IMS\Development\IMS\IMS.Ember\node_modules\ttf2woff2 gyp ERR! node -v v12.12.0 gyp ERR! node-gyp -v v5.0.5 gyp ERR! not ok”

And then another error shows-up as below: “error An unexpected error occurred: “ENOENT: no such file or directory, lstat ‘C:\SourceCode\IMS\Development\IMS\IMS.Ember\node_modules\webpack\node_modules\enhanced-resolve\node_modules’”. info If you think this is a bug, please open a bug report with the information provided in “C:\SourceCode\IMS\Development\IMS\IMS.Ember\yarn-error.log”. info Visit yarn add | Yarn for documentation about this command.”

Any help please - not able to understand what is going wrong - any help please - thank you.

After many efforts I have fixed those issues, then installed the ember-truth-helpers using command: “yarn add ember-truth-helpers --dev”

Then placed the if condition as below:

        {{#if (eq "complete" "complete")}} 
        {{log 'Complete 1'}}
        {{/if}}

then Ran the .watch and ran the application, on the browser console it still showing me the error, as below:

ember.debug.js:43618 Uncaught (in promise) Error: Compile Error: eq is not a helper
at ember.debug.js:43618
at Compilers.compile (ember.debug.js:43363)
at LazyOpcodeBuilder.expr (ember.debug.js:45175)
at args (ember.debug.js:43774)
at LazyOpcodeBuilder.replayable (ember.debug.js:45781)
at LazyOpcodeBuilder.replayableIf (ember.debug.js:45835)
at ember.debug.js:43772
at Blocks.compile (ember.debug.js:43694)
at LazyCompiler.compileBlock (ember.debug.js:44249)
at LazyOpcodeBuilder.compileBlock (ember.debug.js:44803)

Any help please? These helpers methods have to work for me to accomplish anything in my project. Otherwise every change I have to make on Server to format the display and its very tough. Any help would be greatly appreciated - thank you

Is it possible that your project’s name is “Ember” and this is not an Ember.JS project?

Most Ember.JS projects have a different structure and use Ember CLI, not a custom webpack configuration. You can see how an Ember CLI project looks like here → Ember - CodeSandbox

Compare the package.json files of your project and the sandbox one that I gave. Do you see similar dependencies? If there are no ember-* ones, than this is not the right framework

1 Like

My Package.json looks as below:

{
  "name": "ims-ember",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {},
  "author": "",
  "license": "ISC",
  "description": "",
  "dependencies": {
    "babel-core": "^6.26.3",
    "babel-polyfill": "^6.26.0",
    "babel-preset-env": "^1.7.0",
    "babel-preset-es2016": "^6.24.1",
    "bootbox.js": "^4.3.0",
    "bootstrap": "^3.3.7",
    "bootstrap-datepicker": "^1.9.0",
    "bootstrap-hover-dropdown": "^2.2.1",
    "chosen-js": "^1.8.7",
    "datatables": "^1.10.18",
    "ember-cli-windows": "github:felixrieseberg/ember-cli-windows",
    "ember-source": "^3.13.2",
    "file-loader": "^4.2.0",
    "font-awesome": "^4.7.0",
    "gulp": "^4.0.2",
    "gulp-babel": "^8.0.0",
    "gulp-clean": "^0.4.0",
    "gulp-clean-css": "^4.2.0",
    "gulp-concat": "^2.6.1",
    "gulp-concat-sourcemap": "^1.3.1",
    "gulp-declare": "^0.3.0",
    "gulp-filter": "^6.0.0",
    "gulp-if": "^3.0.0",
    "gulp-insert": "^0.5.0",
    "gulp-less": "^4.0.1",
    "gulp-replace": "^1.0.0",
    "gulp-uglify": "^3.0.2",
    "gulp-wrap": "^0.15.0",
    "gulp-wrap-file": "^0.1.2",
    "handlebars": "^4.4.2",
    "icons-loader": "0.0.6",
    "inputmask": "^4.0.9",
    "jquery": "^3.4.1",
    "jquery-ui": "^1.12.1",
    "json-stringify-safe": "^5.0.1",
    "lightbox2": "^2.11.1",
    "loader-utils": "^1.2.3",
    "moment": "^2.24.0",
    "mssql": "^5.1.0",
    "node-sass": "^4.12.0",
    "npm": "^6.13.0",
    "popper.js": "^1.15.0",
    "rimraf": "^3.0.0",
    "sass-loader": "^8.0.0",
    "schema-utils": "^2.4.1",
    "toastr": "^2.1.4",
    "typeahead.js": "^0.11.1",
    "uglifyjs-webpack-plugin": "^2.2.0",
    "uuid": "^3.3.3"
  },
  "devDependencies": {
    "@babel/core": "^7.6.2",
    "@babel/preset-env": "^7.6.2",
    "babel-loader": "^8.0.6",
    "css-loader": "^3.2.0",
    "ember-truth-helpers": "^2.1.0",
    "install": "^0.13.0",
    "less-loader": "^5.0.0",
    "style-loader": "^1.0.0",
    "webpack": "^4.41.0",
    "webpack-cli": "^3.3.10"
  }
}

OK even if its not and maybe its started as Visual Studio some MVC etc template project later added the Ember by webpack api or some manual copy and pasting files, still is there anyway that I can make the helper functions work? - that’s all I needed and without that my life is becoming miserable - any help please. This is the biggest problem with js library technologies - once track is left - it would become impossible to run things right way and leave programmers nightmares, I am really worried, I need to make these “ember-truth-helpers” or my own helper functions work - please.

Based on that package.json contents it seems like your project must be using a completely home grown application structure. If that is the case, it is pretty unlikely that folks here will be able to help you figure out how to consume any random addon. Most likely you’d have to figure out how your project build actually functions, figure out how ember-cli’s normal addon build process works (to know what steps you need to add to your bespoke build system), and update your custom build process to support addons. In short, its a bunch of work. :frowning_face:

I am tired any help my friend - please, very tired, all I need is just make those helper functions work - please help me please.

There is nothing special about those functions. Assuming that however your build system works it allows you to author helpers, you can copy the basic logic out of those helpers into your app. It’s pretty horrible, but it should work.

You really should try to figure out how to migrate out of your custom bespoke setup into a system that is idiomatic. Until you are able to do that:

  1. You will not be able to follow along with the documentation you might read on Ember / ember-cli / etc.
  2. You will have to maintain your own build pipeline.
  3. You will eventually get “stuck” in your ability to upgrade ember-source versions (soon enough ember-source will not publish prebuilt bundles at all).
  4. Folks in the community discord and this forum won’t be able to help you very much.

Can you share your webpack config files? And maybe the gulp file as well

1 Like

I did, I did try to add my own helper functions, even they are also not recognized, even that would have at least helped me, any help my friend either to write my own custom helpers or use helpers from other sources - anything helps