Skip to content
This repository was archived by the owner on Jul 17, 2018. It is now read-only.

Commit

Permalink
Merge pull request #23 from alphagov/fix-npm-install-warning
Browse files Browse the repository at this point in the history
Add hack to check node_modules exists
  • Loading branch information
NickColley authored Feb 2, 2018
2 parents a8bc94e + 34075c7 commit 050dfb2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Unreleased

Bug fixes:

- [#23 Fix npm install warnings](https://github.com/alphagov/govuk-prototype-kit-private-beta/pull/23)

# 7.0.0-beta.2

- [#21 Update links to the design system](https://github.com/alphagov/govuk-prototype-kit-private-beta/pull/21)
Expand Down
3 changes: 2 additions & 1 deletion start.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const path = require('path')
const fs = require('fs')

// Warn if node_modules folder doesn't exist
const nodeModulesExists = fs.existsSync(path.join(__dirname, '/node_modules'))
// HACK: Check /express since we are committing in node_modules in this prototype version of the kit
const nodeModulesExists = fs.existsSync(path.join(__dirname, '/node_modules', '/express'))
if (!nodeModulesExists) {
console.error('ERROR: Node module folder missing. Try running `npm install`')
process.exit(0)
Expand Down

0 comments on commit 050dfb2

Please sign in to comment.