gpt4 book ai didi

ionic-framework - ionic 4 : Cannot GET/

转载 作者:行者123 更新时间:2023-12-03 20:15:38 30 4
gpt4 key购买 nike

为什么我会收到这个错误?我在cmd中运行以下命令:

ionic start pollito tabs

cd pollito
ionic server

CMD: [INFO] Browser window opened to http://localhost:8100!


[ng] i 「wdm」: wait until bundle finished: / [ng] Date: 2019-05-04T05:20:49.125Z [ng] Hash: dc6d227d2df5e3578183 [ng] Time: 154003ms [ng] [ng] ERROR in ./src/global.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/global.scss)[ng] Module build failed (from ./node_modules/sass-loader/lib/loader.js): [ng] Error: Cannot find module 'node-sass' [ng] Require stack: [ng] - C:\Angel\pollito\node_modules\sass-loader\lib\loader.js [ng] - C:\Angel\pollito\node_modules\loader-runner\lib\loadLoader.js [ng] - C:\Angel\pollito\node_modules\loader-runner\lib\LoaderRunner.js [ng] - C:\Angel\pollito\node_modules\webpack\lib\NormalModule.js [ng] - C:\Angel\pollito\node_modules\webpack\lib\NormalModuleFactory.js [ng] - C:\Angel\pollito\node_modules\webpack\lib\Compiler.js [ng] - C:\Angel\pollito\node_modules\webpack\lib\webpack.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\build-webpack\src\webpack\index.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\build-webpack\src\index.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\build-angular\src\dev-server\index.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\architect\src\architect-legacy.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\architect\src\index.js [ng] - C:\Angel\pollito\node_modules@angular\cli\models\architect-command.js [ng] - C:\Angel\pollito\node_modules@angular\cli\commands\build-impl.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\schematics\tools\export-ref.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\schematics\tools\index.js [ng] - C:\Angel\pollito\node_modules@angular\cli\utilities\json-schema.js [ng] - C:\Angel\pollito\node_modules@angular\cli\models\command-runner.js [ng] - C:\Angel\pollito\node_modules@angular\cli\lib\cli\index.js [ng] - C:\Angel\pollito\node_modules@angular\cli\lib\init.js [ng] - C:\Angel\pollito\node_modules@angular\cli\bin\ng [ng] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15) [ng] at Function.Module._load (internal/modules/cjs/loader.js:526:27) [ng] at Module.require (internal/modules/cjs/loader.js:666:19) [ng] at require (internal/modules/cjs/helpers.js:16:16) [ng] at Object.sassLoader (C:\Angel\pollito\node_modules\sass-loader\lib\loader.js:46:72) [ng] ERROR in ./src/theme/variables.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/theme/variables.scss) [ng] Module build failed (from ./node_modules/sass-loader/lib/loader.js): [ng] Error: Cannot find module 'node-sass' [ng] Require stack: [ng] - C:\Angel\pollito\node_modules\sass-loader\lib\loader.js [ng] - C:\Angel\pollito\node_modules\loader-runner\lib\loadLoader.js [ng] - C:\Angel\pollito\node_modules\loader-runner\lib\LoaderRunner.js [ng] - C:\Angel\pollito\node_modules\webpack\lib\NormalModule.js [ng] - C:\Angel\pollito\node_modules\webpack\lib\NormalModuleFactory.js [ng] - C:\Angel\pollito\node_modules\webpack\lib\Compiler.js [ng] - C:\Angel\pollito\node_modules\webpack\lib\webpack.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\build-webpack\src\webpack\index.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\build-webpack\src\index.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\build-angular\src\dev-server\index.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\architect\src\architect-legacy.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\architect\src\index.js [ng] - C:\Angel\pollito\node_modules@angular\cli\models\architect-command.js [ng] - C:\Angel\pollito\node_modules@angular\cli\commands\build-impl.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\schematics\tools\export-ref.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\schematics\tools\index.js [ng] - C:\Angel\pollito\node_modules@angular\cli\utilities\json-schema.js [ng] - C:\Angel\pollito\node_modules@angular\cli\models\command-runner.js [ng] - C:\Angel\pollito\node_modules@angular\cli\lib\cli\index.js [ng] - C:\Angel\pollito\node_modules@angular\cli\lib\init.js [ng] - C:\Angel\pollito\node_modules@angular\cli\bin\ng [ng] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15) [ng] at Function.Module._load (internal/modules/cjs/loader.js:526:27) [ng] at Module.require (internal/modules/cjs/loader.js:666:19) [ng] at require (internal/modules/cjs/helpers.js:16:16) [ng] at Object.sassLoader (C:\Angel\pollito\node_modules\sass-loader\lib\loader.js:46:72) [ng] ERROR in ./src/app/tab1/tab1.page.scss [ng] Module build failed (from ./node_modules/sass-loader/lib/loader.js): [ng] Error: Cannot find module 'node-sass' [ng] Require stack: [ng] - C:\Angel\pollito\node_modules\sass-loader\lib\loader.js [ng] - C:\Angel\pollito\node_modules\loader-runner\lib\loadLoader.js [ng] - C:\Angel\pollito\node_modules\loader-runner\lib\LoaderRunner.js [ng] - C:\Angel\pollito\node_modules\webpack\lib\NormalModule.js [ng] - C:\Angel\pollito\node_modules\webpack\lib\NormalModuleFactory.js [ng] - C:\Angel\pollito\node_modules\webpack\lib\Compiler.js [ng] - C:\Angel\pollito\node_modules\webpack\lib\webpack.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\build-webpack\src\webpack\index.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\build-webpack\src\index.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\build-angular\src\dev-server\index.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\architect\src\architect-legacy.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\architect\src\index.js [ng] - C:\Angel\pollito\node_modules@angular\cli\models\architect-command.js [ng] - C:\Angel\pollito\node_modules@angular\cli\commands\build-impl.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\schematics\tools\export-ref.js [ng] - C:\Angel\pollito\node_modules@angular-devkit\schematics\tools\index.js [ng] - C:\Angel\pollito\node_modules@angular\cli\utilities\json-schema.js [ng] - C:\Angel\pollito\node_modules@angular\cli\models\command-runner.js [ng] - C:\Angel\pollito\node_modules@angular\cli\lib\cli\index.js [ng] - C:\Angel\pollito\node_modules@angular\cli\lib\init.js [ng] - C:\Angel\pollito\node_modules@angular\cli\bin\ng [ng] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15) [ng] at Function.Module._load (internal/modules/cjs/loader.js:526:27) [ng] at Module.require (internal/modules/cjs/loader.js:666:19) [ng] at require (internal/modules/cjs/helpers.js:16:16) [ng] at Object.sassLoader (C:\Angel\pollito\node_modules\sass-loader\lib\loader.js:46:72) [ng] chunk {common} common.js, common.js.map (common) 20.2 kB [rendered] [ng] chunk {es2015-polyfills} es2015-polyfills.js, es2015-polyfills.js.map (es2015-polyfills) 284 kB [initial] [rendered] [ng] chunk {main} main.js, main.js.map (main) 32 kB [initial] [rendered] [ng] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 237 kB [initial] [rendered] [ng] chunk {runtime} runtime.js, runtime.js.map (runtime) 8.9 kB [entry] [rendered] [ng] chunk {styles} styles.js, styles.js.map (styles) 22.5 kB [initial] [rendered] [ng] chunk {tab1-tab1-module} tab1-tab1-module.js, tab1-tab1-module.js.map (tab1-tab1-module) 7.87 kB [rendered] [ng] chunk {tab2-tab2-module} tab2-tab2-module.js, tab2-tab2-module.js.map (tab2-tab2-module) 4.52 kB [rendered] [ng] chunk {tab3-tab3-module} tab3-tab3-module.js, tab3-tab3-module.js.map (tab3-tab3-module) 4.52 kB [rendered] [ng] chunk {tabs-tabs-module} tabs-tabs-module.js, tabs-tabs-module.js.map (tabs-tabs-module) 7.55 kB [rendered] [ng] chunk {vendor} vendor.js, vendor.js.map (vendor) 4.36 MB [initial] [rendered] [ng] i 「wdm」: Failed to compile.


浏览器:无法获取/

最佳答案

当您使用 ionic serve 命令时,项目并没有完全建立起来。为此,您必须使用 ionic build命令。
如果你的项目有错误,运行 ionic serve 时可能不会显示!项目崩溃,您的浏览器出现“无法获取”错误。
就我而言,我只需要做 ionic build查看错误是什么并修复它。然后它工作得更好;)

关于ionic-framework - ionic 4 : Cannot GET/,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55979776/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com