Я пытаюсь следовать вместе с учебником и немного узнать о node.js. Тем не менее, я все еще получаю странную ошибку. После npm install stylus
, я получаю это:Stylus Not Defined After Successful npm install
npm http GET https://registry.npmjs.org/stylus
npm http 304 https://registry.npmjs.org/stylus
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/sax
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/sax
[email protected] node_modules/stylus
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
нет ошибок, ничего не предупреждал меня о конце мира, даже не какой-либо красный текст. Затем, когда я пытаюсь запустить приложение node app.js
я ReferenceError: stylus is not defined
на этой линии:
app.use(stylus.middleware(
{
src: __dirname + '/public'
, compile: compile
}
))
Гах. Я имел var 'stylue = require ('stylus')' и не поймал его. Проблема решена, спасибо! – Linell