npm run watch-poll

2024-09-01 15:18
文章标签 npm run watch poll

本文主要是介绍npm run watch-poll,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

使用 webpack 自动编译时,出现异常,日志:

[root@vm shop]# npm run watch-poll> @ watch-poll /home/www/shop
> npm run watch -- --watch-poll> @ watch /home/www/shop
> npm run development -- --watch "--watch-poll"> @ development /home/www/shop
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"sh: cross-env: command not foundnpm ERR! Linux 3.10.0-229.20.1.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "development" "--" "--watch" "--watch-poll"
npm ERR! node v6.16.0
npm ERR! npm  v3.10.10
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @ development script 'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?npm ERR! Please include the following file with any support request:
npm ERR!     /home/www/shop/npm-debug.lognpm ERR! Linux 3.10.0-229.20.1.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "watch" "--" "--watch-poll"
npm ERR! node v6.16.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @ watch: `npm run development -- --watch "--watch-poll"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch script 'npm run development -- --watch "--watch-poll"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run development -- --watch "--watch-poll"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?npm ERR! Please include the following file with any support request:
npm ERR!     /home/www/shop/npm-debug.lognpm ERR! Linux 3.10.0-229.20.1.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "watch-poll"
npm ERR! node v6.16.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @ watch-poll: `npm run watch -- --watch-poll`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch-poll script 'npm run watch -- --watch-poll'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run watch -- --watch-poll
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?npm ERR! Please include the following file with any support request:
npm ERR!     /home/www/shop/npm-debug.log
[root@vm shop]#

配置 Yarn 安装加速:yarn config set registry https://registry.npm.taobao.org
使用 Yarn 安装依赖:SASS_BINARY_SITE=http://npm.taobao.org/mirrors/node-sass yarn
yarn 前指定 SASS_BINARY_SITE 的上的是告诉 yarn 到淘宝的镜像下载 node-sass 二进制文件。
然后再次执行 npm run watch-poll

[root@vm shop]# yarn config set registry https://registry.npm.taobao.org
yarn config v1.15.2
success Set "registry" to "https://registry.npm.taobao.org".
Done in 0.06s.
[root@vm shop]#
[root@vm shop]# SASS_BINARY_SITE=http://npm.taobao.org/mirrors/node-sass yarn
yarn install v1.15.2
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.7: The platform "linux" is incompatible with this module.
info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > sass-loader@7.1.0" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 30.13s.
[root@vm shop]#
[root@vm shop]# npm run watch-poll> @ watch-poll /home/www/shop
> npm run watch -- --watch-poll> @ watch /home/www/shop
> npm run development -- --watch "--watch-poll"> @ development /home/www/shop
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"Additional dependencies must be installed. This will only take a moment.Running: yarn add vue-template-compiler --dev --production=falsewarning " > sass-loader@7.1.0" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".Okay, done. The following packages have been installed and saved to your package.json dependencies list:- vue-template-compiler10% building 1/1 modules 0 active
webpack is watching the files…98% after emitting SizeLimitsPluginDONE  Compiled successfully in 9795ms                                                                        8:58:06 AMAsset      Size   Chunks             Chunk Names
/css/app.css   174 KiB  /js/app  [emitted]  /js/app/js/app.js  1.37 MiB  /js/app  [emitted]  /js/app

这篇关于npm run watch-poll的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1127301

相关文章

C++ I/O多路复用 select / poll / epoll

I/O多路复用:在网络I/O中,用 1个或1组线程 管理 多个连接描述符。             如果有至少一个描述符准备就绪,就处理对应的事件             如果没有,就会被阻塞,让出CPU给其他应用程序运行,直到有准备就绪的描述符 或 超时

select、poll、epoll的区别

select、poll、epoll均为linux中的多路复用技术。3种技术出现的顺序是select、poll、epoll,3个版本反应了多路复用技术的迭代过程。我们现在开发网络应用时, 一般都会使用多路复用,很少有用一个线程来监听一个fd的,其中epoll又是最常使用的。关于epoll的实现和常见问题可以参考epoll实现原理和常见问题总结。 当我们在使用epoll的时候,会想当然的认为这种技术

GDB watch starti i files

watch break starti 在程序的最初开始运行的位置处断下来 ​​ i files 查看程序及加载的 so 的 sections ​​

select poll epoll之间的区别比较

select,poll,epoll都是IO多路复用的机制。I/O多路复用就是通过一种机制,可以监视多个描述符,一旦某个描述符就绪(一般是读就绪或者写就绪),能够通知程序进行相应的读写操作。但select,poll,epoll本质上都是同步I/O,因为他们都需要在读写事件就绪后自己负责进行读写,也就是说这个读写过程是阻塞的,而异步I/O则无需自己负责进行读写,异步I/O的实现会负责把数据从内核

[vue小白]npm run运行以后无法关闭

开启vue任务后,关闭git bash窗口发现端口仍然被占用,程序没有关闭 通过查询资料,大部分都说ctrl+c就可以了,但是经过实践发现并不可行,目测大部分都是复制粘贴的答案。 经过尝试,最终发现可能只能暴力关闭了 1.在cmd中输入netstat -ano查询占用端口号的pid 2. 然后在任务管理器中查询对应的任务并关闭 3. 在linux系统中更简单,直接kill -9 pid即可

浅谈NODE的NPM命令和合约测试开发工具HARDHAT

$ npm install yarn -g  # 将模块yarn全局安装 $ npm install moduleName # 安装模块到项目目录下 默认跟加参数 --save 一样 会在package文件的dependencies节点写入依赖。   $ npm install -g moduleName # -g 的意思是将模块安装到全局,具体安装到磁盘哪个位置,要看 npm root -g

【解决bug之路】npm install node-sass(^4.14.1)连环报错解决!!!(Windows)

有关node-sass的深入分析可参考:又报gyp ERR!为什么有那么多人被node-sass 坑过? 主要有如下三方面错误,请自查: 1.node,npm版本需与node-sass版本匹配,像node-sass(^4.14.1)就得node 14.x版本才可以,node 16不行 gyp ERR! build error15 gyp ERR! stack Error: `

rust 命令行工具rsup管理前端npm依赖

学习了一年的 rust 了,但是不知道用来做些什么,也没能赋能到工作中,现在前端基建都已经开始全面进入 rust 领域了,rust 的前端生态是越来越好。但是自己奈何水平不够,想贡献点什么,无从下手。 遂想自己捣鼓个什么东西,可以帮助到日常工作的。 记录一下在完成功能时遇到的一些问题,以及是怎么解决的。 解决的需求 公司有很多项目,都是依赖公司技术部门的一个框架,虽然说不行,但还是要用,里

eclipse里maven debug-tomcat:run注意

eclipse里maven debug-tomcat:run注意: 源码调试需要插件:m2e.sourcelookup 在eclipse上 Help->install new software  https://bjmi.github.io/update-site/

npm i --legacy-peer-deps

npm ERR! Fix the upstream dependency conflict, or retrynpm ERR! this command with --force, or --legacy-peer-depsnpm ERR! to accept an incorrect (and potentially broken) dependency resolution. 1、原因