2017-06-09 3 views
1

fehlgeschlagen I TrID test.vue Stift in Dateiwierd! require ('Stift') in .vue Datei

let stylus = require('stylus') 
console.log(stylus) 

aber nicht verwenden.

This dependency was not found: 
* fs in ./~/[email protected]/lib/utils.js, ./~/[email protected]/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 ./~/[email protected]/index.js 

berührte ich eine neue test.js Datei und require ('Stift') drin, es ist ok. so werid.

"vue": "^2.3.3", 
"stylus": "^0.54.5", 

Jede Hilfe wird sehr geschätzt werden, danke.

+0

Try Addierknoten: {fs: 'leer'} in webpack config-Datei. – qkr

+0

@qkr Ich füge es in webpack.base.conf.js hinzu, aber es funktioniert nicht. –

+0

Wenn Sie einen Stylus in '.vue' Dateien verwenden wollen, benötigen Sie einen Loader für das Webpack. Er heißt' stylus-loader' –

Antwort