我试图在test.vue
档
let stylus = require('stylus')
console.log(stylus)
但失败了。
This dependency was not found:
* fs in ./~/.0.54.5@stylus/lib/utils.js, ./~/.0.54.5@stylus/lib/middleware.js and 12 others
To install it, you can run: npm install --save fs
This relative module was not found:
* ./lib-cov/stylus in ./~/.0.54.5@stylus/index.js
我触摸了一个新的test.js
文件并要求('stylus'),没关系。
太干净了。
"vue": "^2.3.3",
"stylus": "^0.54.5",
非常感谢任何帮助,谢谢。
答案 0 :(得分:0)
Stylus javascript API无法在浏览器中运行,因为它取决于NodeJs的fs模块: https://nodejs.org/docs/v0.3.1/api/fs.html