当我运行"npm运行手表“,这是我得到的。
这是一个新鲜的龙舌兰8号项目。
我刚用了八月的包裹。
,这是组件r:-
<template>
<div class="col-md-8 mt-4">
<div class="card card-default">
<div class="card-header">
Task Form
</div>
<div class="card-body">
<form action="./api/task" method="POST" onclick="addTask()">
<div class="form-group">
<input type="text" name="title" placeholder="Task title" class="form-control">
</div>
<input type="submt" value="Add Task" class="btn btn-info">
</form>
</div>
</div>
</div>
</template>
<script >
export default {
mounted() {
console.log('component mounted.')
},
methods: {
addTask(){
alert('Adding The Task');
}
}
}
</script>这里是app.js文件:-
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
window.Vue = require('vue');
/**
* The following block of code may be used to automatically register your
* Vue components. It will recursively scan this directory for the Vue
* components and automatically register them with their "basename".
*
* Eg. ./components/ExampleComponent.vue -> <example-component></example-component>
*/
// const files = require.context('./', true, /\.vue$/i)
// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default))
Vue.component('example-component', require('./components/ExampleComponent.vue').default);
Vue.component('task-form', require('./components/Task.vue'));
/**
* Next, we will create a fresh Vue application instance and attach it to
* the page. Then, you may begin adding components to this application
* or customize the JavaScript scaffolding to fit your unique needs.
*/
const app = new Vue({
el: '#app',
});我不能把所有的错误都贴出来,因为它太长了,我希望这足够理解
,这里是错误:-
kabir@kabir-pc:~/Desktop/Vue$ npm run watch
> @ watch /home/kabir/Desktop/Vue
> npm run development -- --watch
> @ development /home/kabir/Desktop/Vue
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"
10% building 1/1 modules 0 active
webpack is watching the files…
98% after emitting SizeLimitsPlugin
DONE Compiled successfully in 9863ms 3:59:13 pm
Asset Size Chunks Chunk Names
/css/app.css 178 KiB /js/app [emitted] /js/app
/js/app.js 1.41 MiB /js/app [emitted] /js/app
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/axios): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/axios'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/axios/lib/adapters): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/axios/lib/adapters'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/axios/lib): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/axios/lib'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/axios/lib/cancel): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/axios/lib/cancel'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/axios/lib/core): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/axios/lib/core'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/axios/lib/helpers): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/axios/lib/helpers'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/bootstrap/dist/js): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/bootstrap/dist/js'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/bootstrap/scss): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/bootstrap/scss'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/bootstrap/scss/mixins): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/bootstrap/scss/mixins'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/bootstrap/scss/utilities): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/bootstrap/scss/utilities'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/bootstrap/scss/vendor): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/bootstrap/scss/vendor'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/css-loader/lib): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/css-loader/lib'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/jquery/dist): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/jquery/webpack/buildin/global.js'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/webpack/buildin): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/webpack/buildin/harmony-module.js'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/webpack/buildin): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/webpack/buildin/module.js'
Error from chokidar (/home/kabir/Desktop/Vue/node_modules/webpack/buildin): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/node_modules/webpack/buildin/system.js'
Error from chokidar (/home/kabir/Desktop/Vue/resources/js): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/resources/js/app.js'
Error from chokidar (/home/kabir/Desktop/Vue/resources/js): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/resources/js/bootstrap.js'
Error from chokidar (/home/kabir/Desktop/Vue/resources/js/components): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/resources/js/components/ExampleComponent.vue'
Error from chokidar (/home/kabir/Desktop/Vue/resources/js/components): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/resources/js/components/Task.vue'
Error from chokidar (/home/kabir/Desktop/Vue/resources/sass): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/resources/sass/_variables.scss'
Error from chokidar (/home/kabir/Desktop/Vue/resources/sass): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/kabir/Desktop/Vue/resources/sass/app.scss'我不知道还有什么可以作为堆栈溢出输入,而不是要求对这个问题进行更多的描述。
发布于 2020-09-14 10:54:14
尝试使用下面的命令,它会工作的。
npm run watch-pollhttps://stackoverflow.com/questions/63882804
复制相似问题