I have two node.js projects running on v10.14.2. Both were working fine.
Then I deleted all packages in the package.json and reinstalled them like this:
$ npm install <package01> <package02> <package03> ...
Installation was successful. added 228 packages from 155 contributors and audited 393 packages in 11.48s found 0 vulnerabilities
When trying to run it I now get a Error message though:
$ nodemon project01
Error Message:
[nodemon] starting `node project01.js`
/home/Project01/node_modules/hoek/lib/index.js:553
throw new Assert.AssertionError({
^
AssertionError [ERR_ASSERTION]: pattern should not use global or sticky mode
at new AssertionError (internal/assert.js:269:11)
at Object.exports.assert (/home/Project01/node_modules/hoek/lib/index.js:553:11)
at internals.String.regex (/home/Project01/node_modules/joi/lib/types/string/index.js:122:14)
at Object.<anonymous> (/home/Project01/helpers/routeHelpers.js:58:27)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
[nodemon] app crashed - waiting for file changes before starting...
The same for the second app:
$ npm install <package01> <package02> <package03> ...
Installation was successful. added 151 packages from 116 contributors and audited 303 packages in 10.571s found 0 vulnerabilities
$ nodemon project02
Error Message:
[nodemon] starting `node project02.js`
/home/Project02/node_modules/hoek/lib/index.js:553
throw new Assert.AssertionError({
^
AssertionError [ERR_ASSERTION]: pattern should not use global or sticky mode
at new AssertionError (internal/assert.js:269:11)
at Object.exports.assert (/home/Project02/node_modules/hoek/lib/index.js:553:11)
at internals.String.regex (/home/Project02/node_modules/joi/lib/types/string/index.js:122:14)
at Object.<anonymous> (/home/Project02/helpers/routeHelpers.js:47:27)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
[nodemon] app crashed - waiting for file changes before starting...
What am I missing and what do I need to do to fix this?