Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Trouble Installing NPM Modules... (NodeJS)

Featured Replies

Unfortunately I don't see much NodeJS activity in these parts, so I'm taking a chance here.. But I'd like to avoid adding yet another forum subscription to my already long list, so I'm hoping someone here with a better understanding of JavaScript can point me in the right direction?

 

For reference, my current code for this project can be found here, to which I've just pushed my latest changes for clarity. I'm rather new to NodeJS, not quite so new to the concept of AMD style JavaScript, but I can't figure out what's going on here. In case you're not familiar with the boilerplate I used, the generated website's index file is in the `/views` folder, and the rest of the published web app is built inside the `/assets/javascripts/app/` folder[1].

 

So, with a standard NodeJS setup, the command...

 

npm install <module>

...would install the chosen module to the `/node_modules` folder, and using...

 

require("<module>");

...inside a Node app module file would know where to load it from thanks to it's own environment.

 

 

With my current setup (boilerplate source), npm installs the module as expected, but I can't load it from within my app folder [1]. In case it makes any difference, in this particular case I'm trying to install nano.

 

I've checked both the Mimosa documentation in case this is a framework-related issue, but I see no mention of how to load standard NodeJS modules (only `mimosa-<module>` is available).

 

Then I checked the Bower docs in case it's to do with the copy/install/download system, but that left me even more confused. If I try change any of the module dependencies set in `bower.json`, it ends up pulling the original boilerplate into my project again, overwriting my initial files and therefore the app itself.

 

Any bright ideas? I'm itching to get on with this project, but I can't until I work a way around this. :mellow:

  • Author

Heh, just my luck.. Small discovery, watching my project folder while Bower installs something, it appears to download a Git repo, extract the files it needs, then clear the temporary download folder... While this still doesn't fix my problem, it is still somewhat applicable to my question; I can't see a way to install anything with this that isn't listed in the Bower list of available downloads.

  • Author

To close this thread off... While I appreciate the amount of work that's gone into the whole Mimosa package, it quite simply doesn't gel with my workflow. In researching the implementation of another of my projects, I found Partial.js to be an almost almost perfect starting point. While it's not even that same type of system as Mimosa, I prefer starting off with a clean slate and adding only the functionality I want / need in my app.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.