0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

chore: new constant for plugins

This commit is contained in:
Juan Picado @jotadeveloper 2018-07-15 19:40:36 +02:00
parent 55c146cb5d
commit 78d3364691
No known key found for this signature in database
GPG key ID: 18AC54485952D158
2 changed files with 3 additions and 2 deletions

View file

@ -93,7 +93,7 @@ export const APP_ERROR = {
};
export const DEFAULT_NO_README = 'ERROR: No README data found!';
export const MODULE_NOT_FOUND = 'MODULE_NOT_FOUND';
export const WEB_TITLE = 'Verdaccio';

View file

@ -4,6 +4,7 @@ import Path from 'path';
import _ from 'lodash';
import logger from './logger';
import type {Config} from '@verdaccio/types';
import {MODULE_NOT_FOUND} from './constants';
/**
* Requires a module.
@ -14,7 +15,7 @@ function tryLoad(path: string) {
try {
return require(path);
} catch (err) {
if (err.code === 'MODULE_NOT_FOUND') {
if (err.code === MODULE_NOT_FOUND) {
return null;
}
throw err;