Setting up a new plugin in ember-cli

Attempting to set up ember-simple-auth in an Ember CLI project, but encountering issues. A new Ember CLI project was created and the following steps were taken to install ember-simple-auth.

npm install --save-dev ember-cli-simple-auth
ember generate ember-cli-simple-auth

In addition, bower install was run to ensure nothing was missed, and verified that ember-simple-auth is present in bower_components. However, upon trying to import it using

import Base from 'simple-auth/authorizers/base';

An error is thrown by ember server:

ENOENT, no such file or directory '/home/me/Projects/spa_client/tmp/tree_merger-tmp_dest_dir-8L6qfwzZ.tmp/simple-auth.js'

What could be missing?

Edit

Ember CLI version:

$ ember -v
version: 0.0.46
node: 0.10.25
npm: 1.4.27

Answer №1

When encountering the ENOENT error while using ember-cli-simple-auth shim, one workaround is to delete the tmp directory by running rm -r tmp. This action forces ember-cli to rebuild and often resolves issues where new pieces are not picked up without a complete re-build of the directory structure.

If you choose not to use the ember-cli shim and opt for the bower route, you will need to use app.import in your Brocfile. Here's an example:

app.import('bower_components/ember-simple-auth/ember-simple-auth.js');

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Implement ng-model on an input field that is pre-filled with a value from a different model within the Angular

One challenge I am facing involves pre-populating an input field with user information, such as their email address or first name, if that data is available. Initially, I set the value of the input field using $scope.userData. However, when I add an ng-mo ...

In the absence of a value

In my code, I've implemented a functionality that saves the user's input into local storage and displays it in a specific ID. However, I want to make sure that if the input field is left empty, the user is prompted to enter their name. function ...

Alert and console.log continue to show the error message: 'Uncaught TypeError: Cannot read property ' ' of undefined

Encountering a Uncaught TypeError: Cannot read property 'valeurs' of undefined, however the alert() and console.log() functions are successfully displaying the data. Below is the code snippet: var item = document.getElementById('inputData&a ...

Error: The variable $traceurRuntime has not been defined in the AngularJS application

Currently, I am utilizing [gulp-traceur][1] to convert es6 to js within my angularjs application (version 1.x). However, when attempting to compile a for loop, an error occurs: ReferenceError: $traceurRuntime is not defined It appears that I may need to ...

Notation for JavaScript UML component diagrams

When creating connections between entities on a UML diagram, the standard notation is the ball-and-socket/lollipop method. Each pair should include the interface implemented. However, since my project is in JavaScript and doesn't have interfaces, I am ...

Determining the currently active tab in Material UI: A simple guide

I am currently working with the Material UITabs component. I am facing an issue where I need to display details specific to each tab on hover, but my current setup shows the details for all tabs regardless of their active state. Below is how I have impleme ...

The updates made to a variable within an ajax request are not immediately reflected after the request has been completed

My global variable is not displaying the expected result: function checkLiveRdv(salle, jour, dateus, heure) { var resu; var urlaction = myUrl; $.ajax({ type: "POST", dataType: "json", url: urlaction, data: myDatas, suc ...

Looking to retrieve the specific clientX and clientY JavaScript Position within a child div element on a Wordpress Page?

I've implemented a highlight hover map in JavaScript that displays an 'info box' div when hovering over a specific area at . However, I'm encountering an issue where the 'info box' doesn't appear precisely at the mouse lo ...

Angular JS is failing to update views when passing dynamic IDs

I have implemented a method in my controller where I pass a dynamic id using the ng-init function, fetch a response through ajax calls, and try to print the response. However, I am facing an issue as the response is not getting printed. I am using ng-repea ...

Should an array be sorted before employing Array iterator methods, is it beneficial?

Imagine handling arrays that contain 100 or more elements, requiring frequent content searches. Would sorting these arrays enhance the efficiency of utilizing built-in Array iterator methods such as Array.prototype.forEach or Array.prototype.find? ...

Employing the powerful Math.pow() function within the setState() method

In this ReactJS code example, the goal is to update the value of a div element with every click of a button using the Math.pow() method. However, it seems that the method is not working as intended. Can someone explain why? The handlerButton function in ...

What is the best way to configure routes for a Single Page App with Express.js?

I am currently in the process of developing a single page application using Express.js. On my index.html file, I have included a simple form that, upon submission, will send a request to an API, fetch the data, process it, and then display the parsed infor ...

Display content from an external HTML page within a div using Ionic

Currently, I am facing an issue where I am utilizing [innerHtml] to populate content from an external HTML page within my Ionic app. However, instead of loading the desired HTML page, only the URL is being displayed on the screen. I do not wish to resort t ...

Tips for integrating google's api.js file into my vue application

Currently, I am in the process of integrating Google Calendar into my Vue project. The steps I am following can be found at this link. Additionally, I came across an example code snippet at this URL. This is how my Vue file looks: <template> <d ...

Display XML data from a service in a sleek panel using SAPIU5/Javascript

My payload contains XML content received from a service. I have an expand/collapse panel that, when clicked, should display the content of the payload in a label by binding it. However, the issue is that the content is not displayed in a prettyprint standa ...

The magic of Angular's data binding post-ajax retrieval

My situation is as follows: /items/item/123/edit and I have a controller that combines both the view and edit functionalities: ... if ($routeParams.id) { $scope.itemId = $routeParams.id; $scope.editMode = true; Item.getB ...

Present a Java-generated JSON object on a JSP page using JavaScript

Hello, I am currently working on creating a Json object in Java and would like to display the same JSON object in JSP using JavaScript. Essentially, I am looking to add two more options in my select box using Ajax. The Ajax is being called and I can see th ...

What are some effective techniques for implementing async/await within onAuthStateChanged() of Firebase?

Seeking to enhance my Firebase authentication process when using async/await in React Native. I am inquiring about the optimal method to utilize async/await within firebase.auth().onAuthStateChanged(). Currently, I have implemented it by creating an async ...

To reveal the secret map location, just tap on the button - but remember, this only applies to

I am encountering an issue with duplicating a card and toggling the hidden location map. Currently, the location button only works for the first card and not for the rest. I need each card to independently open and hide the location map when clicked on the ...

The <b-list-group-item> component in a Vue.js CLI application using bootstrap-vue is failing to render

My Vue-CLI app uses Bootstrap-vue and axios to fetch JSON data. The HTML code in my App.vue displays the data using UL and LI tags: <p v-if="loading">Loading...</p> <ul v-else> <li v-for="(value, key) in post" :key="key"> ...