I am running node.js v10.14.2 on a Centos 7. I am trying to configure grunt to compile my less files. However after renaming:
package.json.sample > package.json
Gruntfile.js.sample > Gruntfile.js
grunt-config.json.sample > grunt-config.json
And then running npm install, I get the following error:
> phantomjs-prebuilt@2.1.16 install /usr/share/nginx/html/mage2test.typemaker.co.uk/node_modules/phantomjs-prebuilt
> node install.js
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module '/usr/share/nginx/html/mage2test.typemaker.co.uk/node_modules/phantomjs-prebuilt/install.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:282:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
...
I have tried to separately install phantomjs-prebuilt.
I have tried removing the node_modules content and reinstalling alternative versions of node, but still get the same problem.