Menu icon Foundation
F6 CLI problem with phantom.js

While building a new site-project with 'foundation new', I always receive a long errror output when it is 'installing dependencies ...' and I don't know what's the cause.

It starts with:
------------------------------------------------------------------------------------------------------------------------------------------------------------
phantomjs@1.9.19 install d:\zf6test\node_modules\gulp-uncss\node_modules\uncss\node_modules\phridge\node_modules\phantomjs
> node install.js

PhantomJS not found on PATH
Download already available at C:\Users\myself\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip
Verified checksum of previously downloaded file
Extracting zip contents
Removing d:\zf6test\node_modules\gulp-uncss\node_modules\uncss\node_modules\phridge\node_modules\phantomjs\lib\phantom
Copying extracted folder C:\Users\myself\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1453453545011\phantomjs-1.9.8-windows -> d:\zf6test\node_modules\gulp-uncss\node_modules\uncss\node_modules\phridge\node_modules\phantomjs\lib\phantom
Writing location.js file
Done. Phantomjs binary available at d:\zf6test\node_modules\gulp-uncss\node_modules\uncss\node_modules\phridge\node_modules\phantomjs\lib\phantom\phantomjs.exe

> utf-8-validate@1.2.1 install d:\zf6test\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild
------------------------------------------------------------------------------------------------------------------------------------------------------------

After several lines of errors, finally it ends with:

------------------------------------------------------------------------------------------------------------------------------------------------------------
Binary is fine; exiting.

There were some problems during the installation.

✓ New project folder created.
✗ Node modules not installed. Try running npm install manually.
✓ Bower components installed.

Once you've resolved the above issues, run foundation watch while inside the third folder.
------------------------------------------------------------------------------------------------------------------------------------------------------------

OK, I can enter the project dir, type 'npm install' and it works. Fine so far.

On another pc, where I installed node.js and foundation-cli, I have no problems with phantom.js and there are no errorscoming up.

So I did 'npm cache clean', deleted the npm directory, also deleted contents of c:\Users\myself\AppData\Local\Temp\ and finally uninstalled foundation-cli. Then I installed foundation-cli again. But when building a new project with 'foundation new' the same error is coming up again.

I thought a fresh installation could help, but I'm missing something. :(
Any idea?

foundation 6cliFoundation for Sitesphantom.js

While building a new site-project with 'foundation new', I always receive a long errror output when it is 'installing dependencies ...' and I don't know what's the cause.

It starts with:
------------------------------------------------------------------------------------------------------------------------------------------------------------
phantomjs@1.9.19 install d:\zf6test\node_modules\gulp-uncss\node_modules\uncss\node_modules\phridge\node_modules\phantomjs
> node install.js

PhantomJS not found on PATH
Download already available at C:\Users\myself\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip
Verified checksum of previously downloaded file
Extracting zip contents
Removing d:\zf6test\node_modules\gulp-uncss\node_modules\uncss\node_modules\phridge\node_modules\phantomjs\lib\phantom
Copying extracted folder C:\Users\myself\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1453453545011\phantomjs-1.9.8-windows -> d:\zf6test\node_modules\gulp-uncss\node_modules\uncss\node_modules\phridge\node_modules\phantomjs\lib\phantom
Writing location.js file
Done. Phantomjs binary available at d:\zf6test\node_modules\gulp-uncss\node_modules\uncss\node_modules\phridge\node_modules\phantomjs\lib\phantom\phantomjs.exe

> utf-8-validate@1.2.1 install d:\zf6test\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild
------------------------------------------------------------------------------------------------------------------------------------------------------------

After several lines of errors, finally it ends with:

------------------------------------------------------------------------------------------------------------------------------------------------------------
Binary is fine; exiting.

There were some problems during the installation.

✓ New project folder created.
✗ Node modules not installed. Try running npm install manually.
✓ Bower components installed.

Once you've resolved the above issues, run foundation watch while inside the third folder.
------------------------------------------------------------------------------------------------------------------------------------------------------------

OK, I can enter the project dir, type 'npm install' and it works. Fine so far.

On another pc, where I installed node.js and foundation-cli, I have no problems with phantom.js and there are no errorscoming up.

So I did 'npm cache clean', deleted the npm directory, also deleted contents of c:\Users\myself\AppData\Local\Temp\ and finally uninstalled foundation-cli. Then I installed foundation-cli again. But when building a new project with 'foundation new' the same error is coming up again.

I thought a fresh installation could help, but I'm missing something. :(
Any idea?

Rafi Benkual over 3 years ago

Did you have an permission errors when installing the CLI? Have to use 'sudo'?

What version of node? node -v

Arkarys over 3 years ago

No permission errors when installing CLI. Don't have to use sudo. It's WIn7.
Node version is 5.5.0 but I tried it already with 4.2.6 - same result.

Arkarys over 3 years ago

Meanwhile I installed 'npm install phantom -g', 'npm install python -g' and Python 2.7.11.

Result:
Still 'PhantomJS not found on PATH' and the node-gyp problem as above.

But the former error
'gyp ERR! stack Error: Can't find Python executable "python", ...'
changed to
'VCBuild.exe was not found' and the advice to install Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5 or Microsoft Visual Studio 2008

Ehm, I have Microsoft Visual Studio 2012 installed on my machine ?!?

... makes me mad.

Ivan Ortiz about 2 years ago

I have the same problem in Windows 10. I reinstall PhantomJS in npm but the problem is still there.

You can see all the error lines here:

https://stackoverflow.com/questions/45188926/npm-error-when-i-start-a-new-project-in-foundation