Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Issues with dependencies #660

Closed
DavidBruchmann opened this issue Dec 29, 2015 · 9 comments
Closed

Issues with dependencies #660

DavidBruchmann opened this issue Dec 29, 2015 · 9 comments

Comments

@DavidBruchmann
Copy link

Trying to install FoundationPress with "npm install" I get an error:

[email protected] install /wp-content/themes/FoundationPress/node_modules/gulp-uncss/node_modules/uncss/node_modules/phridge/node_modules/phantomjs
> node install.js

sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! weird error 127
npm ERR! not ok code 0

The directory /wp-content/themes/FoundationPress/node_modules/gulp-uncss never exists and its looking quite a bit strange for me that there are still several inherited subfolders "node_modules" expected by "phantomjs"

@DavidBruchmann
Copy link
Author

After executing / installing by the following line:

apt-get install nodejs-legacy

the installation is downloading and installing uncss as well as phantomjs but hangs again:

[email protected] install /wp-content/themes/FoundationPress/node_modules/node-sass
> node scripts/install.js


module.js:340
    throw err;
          ^
Error: Cannot find module 'config-chain'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/wp-content/themes/FoundationPress/node_modules/npmconf/npmconf.js:2:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0

@DavidBruchmann
Copy link
Author

After installing several breaking modules manually i.e. like this:

npm install config-chain --save-dev

... I got in the post-installation-process but still get an error:

[17:21:17] Using gulpfile /wp-content/themes/FoundationPress/gulpfile.js
[17:21:17] Starting 'build'...
[17:21:17] Starting 'copy'...
[17:21:17] Finished 'copy' after 297 ms
[17:21:17] Starting 'sass'...
[17:21:20] Starting 'javascript'...
[17:21:21] Finished 'javascript' after 931 ms

/wp-content/themes/FoundationPress/node_modules/postcss/lib/lazy-result.js:157
        this.processing = new Promise(function (resolve, reject) {
                              ^
ReferenceError: Promise is not defined

@DavidBruchmann
Copy link
Author

Just installing promise manually with

npm install promise

never solves the problem.

@DavidBruchmann
Copy link
Author

Adding the following line in the file lazy-result.js solves the problem so far:

var Promise = require('../../promise');

... and the installation is finishing, but I still get a few warnings shown:

npm install
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
...
npm WARN prefer global [email protected] should be installed with -g

...

[17:46:31] Finished 'build' after 3.92 s
npm WARN unmet dependency /wp-content/themes/FoundationPress/node_modules/http-signature requires asn1@'0.1.11' but will load
npm WARN unmet dependency /wp-content/themes/FoundationPress/node_modules/asn1,
npm WARN unmet dependency which is version 0.2.3
npm WARN unmet dependency /wp-content/themes/FoundationPress/node_modules/http-signature requires assert-plus@'^0.1.5' but will load
npm WARN unmet dependency /wp-content/themes/FoundationPress/node_modules/assert-plus,
npm WARN unmet dependency which is version 0.2.0
npm WARN unmet dependency /wp-content/themes/FoundationPress/node_modules/http-signature requires ctype@'0.5.3' but will load
npm WARN unmet dependency /wp-content/themes/FoundationPress/node_modules/ctype,
npm WARN unmet dependency which is version 0.5.5
npm WARN unmet dependency /wp-content/themes/FoundationPress/node_modules/npmconf requires uid-number@'0.0.5' but will load
npm WARN unmet dependency /wp-content/themes/FoundationPress/node_modules/uid-number,
npm WARN unmet dependency which is version 0.0.6

"OK" is not shown in the end.

@DavidBruchmann DavidBruchmann changed the title Installation is interrupted due to issue with gulp-uncss and phantomjs Installation is interrupted due issues with dependencies Dec 29, 2015
@DavidBruchmann DavidBruchmann changed the title Installation is interrupted due issues with dependencies Installation is interrupted due to issues with dependencies Dec 29, 2015
@DavidBruchmann
Copy link
Author

executing the following lines never helps and the Warnings about the corresponding versions are still shown:

npm uninstall uid-number
npm install [email protected]
npm uninstall ctype
npm install [email protected]
npm uninstall assert-plus
npm install [email protected]
npm uninstall asn1
npm install [email protected]

@DavidBruchmann
Copy link
Author

executing

npm uninstall node-gyp
npm install -g [email protected]

shows the following warnings

npm WARN engine [email protected]: wanted: {"node":">=0.10.40"} (current: {"node":"v0.10.25","npm":"1.3.10"})
npm WARN engine [email protected]: wanted: {"node":">=0.10.40"} (current: {"node":"v0.10.25","npm":"1.3.10"})
npm WARN engine [email protected]: wanted: {"node":">=0.10.40"} (current: {"node":"v0.10.25","npm":"1.3.10"})

@DavidBruchmann DavidBruchmann changed the title Installation is interrupted due to issues with dependencies Issues with dependencies Dec 29, 2015
@DavidBruchmann
Copy link
Author

Don't know if I should proceed but I've to stop here for the moment even I don't know about the impact.
Any hints are appreciated.

@colin-marshall
Copy link
Collaborator

From the warnings in your second to last reply, I can see that you are using "node":"v0.10.25". This theme requires at least version 4 of Node. Update Node and try again.

@DavidBruchmann
Copy link
Author

Thanks for the important hint.
After following the hint here:
I got still some warnings shown:

npm WARN deprecated [email protected]: Please use gulp-cssnano instead.
npm WARN optional dep failed, continuing [email protected]
npm WARN deprecated [email protected]: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0

and some errors too:

[23:16:33] 'sass' errored after 2.28 s
[23:16:33] Error: The `libsass` binding was not found in /wp-content/themes/FoundationPress/node_modules/gulp-sass/node_modules/node-sass/vendor/linux-ia32-46/binding.node
This usually happens because your node version has changed.
Run `npm rebuild node-sass` to build the binding for your current node version.
    at Object.sass.getBinaryPath (/wp-content/themes/FoundationPress/node_modules/gulp-sass/node_modules/node-sass/lib/extensions.js:158:11)
    at Object.<anonymous> (/wp-content/themes/FoundationPress/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:16:36)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/wp-content/themes/FoundationPress/node_modules/gulp-sass/index.js:183:21)
    at Module._compile (module.js:435:26)
[23:16:33] 'build' errored after 2.81 s
[23:16:33] Error in plugin 'run-sequence'
Message:
    An error occured in task 'sass'.

npm ERR! Linux 3.13.0-74-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.4
npm ERR! npm  v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: `bower install && gulp build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'bower install && gulp build'.
npm ERR! This is most likely a problem with the foundationpress package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     bower install && gulp build
npm ERR! You can get their info via:
npm ERR!     npm owner ls foundationpress
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /wp-content/themes/FoundationPress/npm-debug.log

but after executing the in the error-message proposed line

npm rebuild node-sass

It run through without complains or even warnings.
So I close this issue.
Thanks for the help.

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

No branches or pull requests

2 participants