Cannot Find Module browserify
lukad03 opened this issue · comments
Trying to spin up apps.gov locally and seeing the following error:
bundle exec jekyll build -t
Configuration file: /Users/lukekeller/workspace/apps-gov/_config.yml
Source: /Users/lukekeller/workspace/apps-gov
Destination: /Users/lukekeller/workspace/apps-gov/_site
Incremental build: disabled. Enable with --incremental
Generating...
jekyll_pages_api_search: checking for Node.js: v6.3.1
WARNING: The box-sizing mixin is deprecated and will be removed in the next major version release. This property can now be used un-prefixed.
on line 410 of /Users/lukekeller/workspace/apps-gov/_sass/lib/bourbon/_bourbon-deprecated-upcoming.scss, in `box-sizing'
from line 2 of /Users/lukekeller/workspace/apps-gov/_sass/extends/_card.scss
from line 10 of an unknown file
module.js:442
throw err;
^
Error: Cannot find module 'browserify'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/lukekeller/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/jekyll_pages_api_search-0.4.4/lib/jekyll_pages_api_search/browserify.js:5:18)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
This error comes after following the installation steps, including npm install
. I've even tried installing browserify
globally but that doesn't seem to work either.
Here's the config file:
title: Apps.Gov
email: andrew.stroup@pif.gov
description: > # this means to ignore newlines until "baseurl:"
A marketplace to find cloud based products to help the government
operate better.
baseurl: "" # the subpath of your site, e.g. /blog
url: "https://apps.gov" # the base hostname & protocol for your site
twitter_username: innovfellows
github_username: presidential-innovation-fellows
repo_url: https://github.com/presidential-innovation-fellows/apps-gov
# Build settings
markdown: kramdown
gems:
- jekyll-sitemap
exclude:
- CONTRIBUTING.md
- Gemfile
- Gemfile.lock
- LICENSE.md
- README.md
- go
- node_modules
- package.json
- vendor
- system-security-plan.yml
- about.yml
- manifest.yml
page_gen:
- data: apps
template: page
name: url
dir: apps
# Configuration for jekyll_pages_api_search plugin gem.
jekyll_pages_api_search:
# Uncomment this to speed up site generation while developing.
#skip_index: true
# Each member of `index_fields` should correspond to a field generated by
# the jekyll_pages_api. It can hold an optional `boost` member as a signal
# to Lunr.js to weight the field more highly (default is 1).
index_fields:
title:
boost: 10
tags:
boost: 10
url:
boost: 5
body:
# If defined and browserify and uglifyify are installed, the plugin will
# generate a bundle to define the renderJekyllPagesApiSearchResults
# function.
browserify:
source: 'assets/js/products.js'
target: 'assets/js/products-bundle.js'
I think the error is here: at Object.<anonymous> (/Users/lukekeller/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/jekyll_pages_api_search-0.4.4/lib/jekyll_pages_api_search/browserify.js:5:18)
so line 5 of browserify.js
in the /lib/jekyll_pages_api_search
folder. That particular require statement isn't finding browserify
I am seeing this as well, locally and on my Netlify Deploy builds.
Try to install with npm install -g browserify
I'm seeing this issue as well Error: Cannot find module 'browserify'
I ran npm install -g browserify
and gem pristine --all
, but no luck.
UPDATE
okay... i was able to get it going. not exactly quite sure why. last steps were:
• comment out the browserify:
section of _config.yml
• run jekyll build
• uncomment _config.yml
• run jekyll serve
• no Browserify errors
• 👍