Error: 'tried to require: stylus'
Closed this issue · 7 comments
jkarttunen commented
Any idea where this might come from. This used to work.
Using Node 4.8.3 :(
> xxxxx@1.6.13 build /Users/xxxx
> gulp build
/Users/xxxxxxx/xxx/node_modules/gulp-stylus/node_modules/accord/lib/adapter_base.js:105
throw new Error("'tried to require: " + this.supportedEngines + "'.\nNone found. Make sure one has been installed!");
^
Error: 'tried to require: stylus'.
None found. Make sure one has been installed!
at Stylus.Adapter (/Users/xxxxxxx/xxx/node_modules/gulp-stylus/node_modules/accord/lib/adapter_base.js:105:15)
stephenlacy commented
Did you install stylus?
jkarttunen commented
Yes. Works fine on node 6.x 8.x and 10.x, I think it's something in accord repo.
Tried with gulp 4 and 3
stephenlacy commented
@jkarttunen what happens when you do npm ls | grep stylus
?
ballerabdude commented
I'm having a similar issue and this is what I get
root@4e1f703b956a:/application# npm ls | grep stylus -C 3
│ ├── clone@1.0.4
│ ├── clone-stats@0.0.1
│ └── replace-ext@0.0.1
├─┬ gulp-stylus@2.7.0
│ ├─┬ accord@0.26.4
│ │ ├─┬ convert-source-map@1.6.0
│ │ │ └── safe-buffer@5.1.2
--
│ │ └─┬ extend-shallow@1.1.4
│ │ └── kind-of@1.1.0
│ ├── replace-ext@0.0.1
│ ├─┬ stylus@0.54.5
│ │ ├── css-parse@1.7.0
│ │ ├─┬ debug@4.1.1
│ │ │ └── ms@2.1.1
--
│ └─┬ async@2.6.1
│ └── lodash@4.17.11
├─┬ nib@1.1.2
│ └─┬ stylus@0.54.5
│ ├── css-parse@1.7.0
│ ├─┬ debug@4.1.1
│ │ └── ms@2.1.1
ballerabdude commented
This is a really old site is doing an update on. I'm not sure what the root cause was but I just upgraded to Node 6.
stephenlacy commented
@ballerabdude did you install stylus in the root package.json in the project?
Newer versions of npm remove the tree cascading approach, thus you will may need to install stylus along gulp-stylus
ballerabdude commented
Unfortunately, that does not fix it. Upgrading node versions will do the trick.