Node.js 离子2-观察失败
我在ubuntu上使用的是节点为v6.9.4和npm 3.10.10的ionic 2框架,在上次升级后,我在运行“ionic serve”时遇到了错误: [11:46:06]爱奥尼亚应用程序脚本1.0.0 [11:46:06]开始观看。。。 [11:46:06]已启动生成开发。。。 [11:46:06]清洁开始。。。 [11:46:06]清洁在59毫秒内完成 [11:46:06]复制已开始。。。 [11:46:06]传输已开始。。。 [11:46:57]Transbile在50.84秒内完成 [11:46:57]网页已启动。。。 [11:47:33]复制完成时间为87.03秒 [11:48:16]网页以78.91秒完成 [11:48:16]sass开始。。。 [11:48:27]sass以11.71秒完成 [11:48:27]构建开发在141.78秒内完成 [11:48:30]监视失败:配置为监视以下路径的监视无法启动。很可能是一个文件 引用不存在:/home/te/PhpstormProjects/smarTrip/src/assets/***, /home/te/PhpstormProjects/smarTrip-ionic/src/index.html, /home/te/PhpstormProjects/smarTrip-ionic/src/manifest.json, /home/te/PhpstormProjects/smarTrip-ionic/src/service-worker.js, /home/te/phpstorm项目/smarTrip-ionic/node_模块/ionicons/dist/font/***, /home/te/PhpstormProjects/smarTrip ionic/node_模块/ionic angular/fonts/***, /home/te/phpstorm项目/smarTrip-ionic/node_模块/ionic-angular/polyfills/polyfills.js, /主页/te/PHPStorm项目/smarTrip ionic/node_模块/sw toolbox/sw-toolbox.js [11:48:30]爱奥尼亚应用程序脚本任务:“观看” [11:48:30]错误:配置为监视以下路径的监视无法启动。很可能是一个文件引用了 不存在:/home/te/PhpstormProjects/smarTrip/src/assets/***, /home/te/PhpstormProjects/smarTrip-ionic/src/index.html, /home/te/PhpstormProjects/smarTrip-ionic/src/manifest.json, /home/te/PhpstormProjects/smarTrip-ionic/src/service-worker.js, /home/te/phpstorm项目/smarTrip-ionic/node_模块/ionicons/dist/font/***, /home/te/PhpstormProjects/smarTrip ionic/node_模块/ionic angular/fonts/***, /home/te/phpstorm项目/smarTrip-ionic/node_模块/ionic-angular/polyfills/polyfills.js, /主页/te/PHPStorm项目/smarTrip ionic/node_模块/sw toolbox/sw-toolbox.js npm错误!Linux 4.4.0-21-generic npm错误!argv“/usr/local/bin/node”“/usr/local/bin/npm”“运行”“监视” npm错误!节点v6.9.4 npm错误!npm v3.10.10 npm错误!代码失效循环 npm错误!SmartTrip@watch:`ionic应用程序脚本watch` npm错误!退出状态1 npm错误! npm错误!在SmartTrip@watch脚本“ionic应用程序脚本监视”中失败。 npm错误!确保已安装最新版本的node.js和npm。 npm错误!如果您这样做,这很可能是SmartTrip软件包的问题, npm错误!与npm本身无关。 npm错误!告诉作者此操作在您的系统上失败: npm错误!爱奥尼亚应用程序脚本观察 npm错误!您可以通过以下方式获取有关如何打开此项目问题的信息: npm错误!npm bugs SmartTrip npm错误!或者,如果不可用,您可以通过以下方式获取他们的信息: npm错误!npm所有者ls SmartTrip npm错误!上面可能还有其他日志输出。 npm错误!请在任何支持请求中包括以下文件: npm错误/home/te/PhpstormProjects/smarTrip-ionic/npm-debug.log 节点--v(节点:4154)未处理的PromisejectionWarning:未处理的承诺拒绝(拒绝id:1):错误:通道关闭 我已经尝试删除文件夹node_modules并再次运行npm安装,强制清除npm缓存,安装node.js的最新版本,但没有成功 有人能帮我吗? Tks 尝试添加 “软件工具箱”:“3.4.0” 尝试添加到package.json “软件工具箱”:“3.4.0”Node.js 离子2-观察失败,node.js,angular,ionic2,Node.js,Angular,Ionic2,我在ubuntu上使用的是节点为v6.9.4和npm 3.10.10的ionic 2框架,在上次升级后,我在运行“ionic serve”时遇到了错误: [11:46:06]爱奥尼亚应用程序脚本1.0.0 [11:46:06]开始观看。。。 [11:46:06]已启动生成开发。。。 [11:46:06]清洁开始。。。 [11:46:06]清洁在59毫秒内完成 [11:46:06]复制已开始。。。 [11:46:06]传输已开始。。。 [11:46:57]Transbile在50.84秒内完成 [
对于package.json,我终于解决了我的问题 比我更容易解决的步骤:
谢谢 我终于解决了我的问题 比我更容易解决的步骤:
谢谢 你有更新爱奥尼亚和科尔多瓦吗?查看您正在使用的版本?可能很明显,但仍要检查,您的
src
中是否有文件夹assets
?@Ivaro18是的,assets文件夹在src中您是否更新了
[11:46:06] ionic-app-scripts 1.0.0
[11:46:06] watch started ...
[11:46:06] build dev started ...
[11:46:06] clean started ...
[11:46:06] clean finished in 59 ms
[11:46:06] copy started ...
[11:46:06] transpile started ...
[11:46:57] transpile finished in 50.84 s
[11:46:57] webpack started ...
[11:47:33] copy finished in 87.03 s
[11:48:16] webpack finished in 78.91 s
[11:48:16] sass started ...
[11:48:27] sass finished in 11.71 s
[11:48:27] build dev finished in 141.78 s
[11:48:30] watch failed: A watch configured to watch the following paths failed to start. It likely that a file
referenced does not exist: /home/te/PhpstormProjects/smarTrip-ionic/src/assets/**/*,
/home/te/PhpstormProjects/smarTrip-ionic/src/index.html,
/home/te/PhpstormProjects/smarTrip-ionic/src/manifest.json,
/home/te/PhpstormProjects/smarTrip-ionic/src/service-worker.js,
/home/te/PhpstormProjects/smarTrip-ionic/node_modules/ionicons/dist/fonts/**/*,
/home/te/PhpstormProjects/smarTrip-ionic/node_modules/ionic-angular/fonts/**/*,
/home/te/PhpstormProjects/smarTrip-ionic/node_modules/ionic-angular/polyfills/polyfills.js,
/home/te/PhpstormProjects/smarTrip-ionic/node_modules/sw-toolbox/sw-toolbox.js
[11:48:30] ionic-app-script task: "watch"
[11:48:30] Error: A watch configured to watch the following paths failed to start. It likely that a file referenced
does not exist: /home/te/PhpstormProjects/smarTrip-ionic/src/assets/**/*,
/home/te/PhpstormProjects/smarTrip-ionic/src/index.html,
/home/te/PhpstormProjects/smarTrip-ionic/src/manifest.json,
/home/te/PhpstormProjects/smarTrip-ionic/src/service-worker.js,
/home/te/PhpstormProjects/smarTrip-ionic/node_modules/ionicons/dist/fonts/**/*,
/home/te/PhpstormProjects/smarTrip-ionic/node_modules/ionic-angular/fonts/**/*,
/home/te/PhpstormProjects/smarTrip-ionic/node_modules/ionic-angular/polyfills/polyfills.js,
/home/te/PhpstormProjects/smarTrip-ionic/node_modules/sw-toolbox/sw-toolbox.js
npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "watch"
npm ERR! node v6.9.4
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! SmartTrip@ watch: `ionic-app-scripts watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the SmartTrip@ watch script 'ionic-app-scripts watch'.
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 SmartTrip package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts watch
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs SmartTrip
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls SmartTrip
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/te/PhpstormProjects/smarTrip-ionic/npm-debug.log
node--v(node:4154) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: channel closed
"dependencies": {
"@angular/common": "2.2.1",
"@angular/compiler": "2.2.1",
"@angular/compiler-cli": "2.2.1",
"@angular/core": "2.2.1",
"@angular/forms": "2.2.1",
"@angular/http": "2.2.1",
"@angular/platform-browser": "2.2.1",
"@angular/platform-browser-dynamic": "2.2.1",
"@angular/platform-server": "2.2.1",
"@ionic/storage": "1.1.7",
"ionic-angular": "2.0.0-rc.5",
"ionic-native": "2.2.11",
"ionicons": "3.0.0",
"rxjs": "5.0.0-beta.12",
"zone.js": "0.6.26",
"sw-toolbox": "3.4.0"
},
"devDependencies": {
"@ionic/app-scripts": "1.0.0",
"typescript": "^2.0.3"
},
sudo npm install --no-optional