运行 NPM run watch-poll 报错

运行 npm run watch-poll 报错

运行 npm run watch-poll 报错

运行 npm run watch-poll 报错
webpack.js
const mix = require(‘laravel-mix’);

/*
|————————————————————————– | Mix Asset Management |————————————————————————– | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel application. By default, we are compiling the Sass | file for the application as well as bundling up all the JS files. | */
mix.js(‘resources/js/app.js’, ‘public/js’)
.sass(‘resources/sass/app.scss’, ‘public/css’)
.version()
.copyDirectory(‘resources/editor/js’, ‘public/js’)
.copyDirectory(‘resources/editor/css’, ‘public/css’);

日志文件
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli ‘/www/server/nvm/versions/node/v12.16.1/bin/node’,
1 verbose cli ‘/www/server/nvm/versions/node/v12.16.1/bin/npm’,
1 verbose cli ‘run’,
1 verbose cli ‘watch-poll’
1 verbose cli ]
2 info using npm@6.13.4
3 info using node@v12.16.1
4 verbose run-script [ ‘prewatch-poll’, ‘watch-poll’, ‘postwatch-poll’ ]
5 info lifecycle @prewatch-poll: @
6 info lifecycle @
watch-poll: @
7 verbose lifecycle @watch-poll: unsafe-perm in lifecycle true
8 verbose lifecycle @
watch-poll: PATH: /www/server/nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/www/wwwroot/www.*.com/blog/node_modules/.bin:/www/server/nvm/versions/node/v12.16.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
9 verbose lifecycle @~watch-poll: CWD: /www/wwwroot/www.
.com/blog
10 silly lifecycle @watch-poll: Args: [ ‘-c’, ‘npm run watch – –watch-poll’ ]
11 silly lifecycle @
watch-poll: Returned: code: 1 signal: null
12 info lifecycle @~watch-poll: Failed to exec watch-poll script
13 verbose stack Error: @ watch-poll: npm run watch -- --watch-poll
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/www/server/nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:311:20)
13 verbose stack at ChildProcess. (/www/server/nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:311:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid @
15 verbose cwd /www/wwwroot/www.*****.com/blog
16 verbose Linux 3.10.0-693.2.2.el7.x86_64
17 verbose argv “/www/server/nvm/versions/node/v12.16.1/bin/node” “/www/server/nvm/versions/node/v12.16.1/bin/npm” “run” “watch-poll”
18 verbose node v12.16.1
19 verbose npm v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error @ watch-poll: npm run watch -- --watch-poll
22 error Exit status 1
23 error Failed at the @ watch-poll script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

求大神指点

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
最佳答案

已经解决,最后是将package.json文件中的cross-env删掉即可

4年前 评论
讨论数量: 1

已经解决,最后是将package.json文件中的cross-env删掉即可

4年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!