0
votes

In my ember application I have installed ember-browserify by running

npm install ember-browserify --save

I have then installed pit-scheduler by running

npm install pit-scheduler --save

and then I have restarted ember but when I go to the page I get this error

Uncaught Error: Could not find module npm:pit-scheduler imported from my-app/routes/schedule

Is it because I need to also npm install all of the dependency packages somehow? in the actual package example these are packages which are being imported

<script src="js/jquery-2.2.4.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/moment-with-locales.min.js"></script>
<script src="js/bootstrap-datetimepicker.js"></script>
<script src="../dist/js/pitscheduler.min.js"></script>

I have already installed these packages by running npm install as well but still the same issue. Any idea why that is the case?

url to the packages

https://www.npmjs.com/package/pit-scheduler
https://www.npmjs.com/package/ember-browserify
1

1 Answers

1
votes

I think that pit-schedular can't be included that way to Ember. Here's what you could do, clone pit-scheduler repository in vendor folder and then import it to ember-cli-build.js from there with:

app.import('vendor/pit-scheduler/dist/js/pitscheduler.min.js');