Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install failed #577

Open
fpolli opened this issue Jul 10, 2022 · 2 comments
Open

npm install failed #577

fpolli opened this issue Jul 10, 2022 · 2 comments

Comments

@fpolli
Copy link

fpolli commented Jul 10, 2022

Hi, I was installing the library into a Docker container and after a bunch of deprecated notices, npm install threw an error. I ran git clone per the readme, cd ContentTools and then npm install:

npm ERR! code 1
npm ERR! path /var/www/html/resources/js/ContentTools/node_modules/phantomjs
npm ERR! command failed
npm ERR! command sh -c /tmp/install65745564693.sh
npm ERR! PhantomJS not found on PATH
npm ERR! Phantom installation failed TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
npm ERR! at new NodeError (node:internal/errors:371:5)
npm ERR! at validateString (node:internal/validators:120:11)
npm ERR! at Object.join (node:path:1172:7)
npm ERR! at findSuitableTempDirectory (/var/www/html/resources/js/ContentTools/node_modules/phantomjs/install.js:127:30)
npm ERR! at /var/www/html/resources/js/ContentTools/node_modules/phantomjs/install.js:476:19
npm ERR! at nextTickCallback (/var/www/html/resources/js/ContentTools/node_modules/kew/kew.js:47:28)
npm ERR! at processTicksAndRejections (node:internal/process/task_queues:78:11) {
npm ERR! code: 'ERR_INVALID_ARG_TYPE'
npm ERR! } TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
npm ERR! at new NodeError (node:internal/errors:371:5)
npm ERR! at validateString (node:internal/validators:120:11)
npm ERR! at Object.join (node:path:1172:7)
npm ERR! at findSuitableTempDirectory (/var/www/html/resources/js/ContentTools/node_modules/phantomjs/install.js:127:30)
npm ERR! at /var/www/html/resources/js/ContentTools/node_modules/phantomjs/install.js:476:19
npm ERR! at nextTickCallback (/var/www/html/resources/js/ContentTools/node_modules/kew/kew.js:47:28)
npm ERR! at processTicksAndRejections (node:internal/process/task_queues:78:11)

@anthonyjb
Copy link
Member

anthonyjb commented Jul 11, 2022

Hi @fpolli,

So I'm not sure this is directly related to ContentTools as this seems to be a failure to install PhantomJS, a quick Google shows a number of results for the phrase "PhantomJS not found on PATH". I don't use docker at all I'm afraid so I can't advise on if this might be something specific to docker.

PhantomJS is used for running tests in ContentTools so if you are just trying to include CT in your project you don't need PhantomJS (I don't believe). You should be able to add "ContentTools": "1.6.11" to your package.json dependencies and install it with npm install.

EDIT: 1.6.16 is the latest version sorry.

@fpolli
Copy link
Author

fpolli commented Jul 11, 2022

Thanks! I was hoping so. I am working on it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants