我正在尝试让我的应用程序部署在 Heroku 上。我收到了“sh: 1: ng: not found”错误,但根据这里的回复,我移动了我的@angular/cli、@angular-devkit/build-angular、@angular/compiler-cli 和 typescript。现在我收到“无法解析依赖项:npm ERR!peer @angular/compiler@"11.2.8"”错误。我认为它有一个版本问题?我不确定发生了什么。
我试过运行 'npm update' 并尝试手动将 '@angular/compiler@"11.2.8"' 插入依赖项,然后运行 'npm i' 但两者都给我同样的错误。
这是我的错误:
npm ERR! Found: @angular/compiler@11.0.9
npm ERR! node_modules/@angular/compiler
npm ERR! @angular/compiler@"~11.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/compiler@"11.2.8" from @angular/compiler-cli@11.2.8
npm ERR! node_modules/@angular/compiler-cli
npm ERR! dev @angular/compiler-cli@"^11.0.9" from the root project
npm ERR! peer @angular/compiler-cli@"^11.0.0" from @angular-devkit/build-angular@0.1100.7
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! @angular-devkit/build-angular@"~0.1100.2" from the root project
Run Code Online (Sandbox Code Playgroud)
包.json:
"scripts": {
"ng": …Run Code Online (Sandbox Code Playgroud) 我正在尝试将 springboot 应用程序部署到 heroku,但收到错误消息,指出它找不到 JwtDecoder bean。我尝试用谷歌搜索一下,但找不到任何有帮助的东西。一切在本地都工作正常,只是部署到 Heroku 时就不行了。
这是我的 heroku 日志 --tail:
2021-02-27T20:18:45.134160+00:00 app[web.1]: ***************************
2021-02-27T20:18:45.134160+00:00 app[web.1]: APPLICATION FAILED TO START
2021-02-27T20:18:45.134160+00:00 app[web.1]: ***************************
2021-02-27T20:18:45.134161+00:00 app[web.1]:
2021-02-27T20:18:45.134161+00:00 app[web.1]: Description:
2021-02-27T20:18:45.134161+00:00 app[web.1]:
2021-02-27T20:18:45.134179+00:00 app[web.1]: Method springSecurityFilterChain in
org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration
required a bean of type 'org.springframework.security.oauth2.jwt.JwtDecoder' that
could not be found.
2021-02-27T20:18:45.134179+00:00 app[web.1]:
2021-02-27T20:18:45.134179+00:00 app[web.1]:
2021-02-27T20:18:45.134180+00:00 app[web.1]: Action:
2021-02-27T20:18:45.134180+00:00 app[web.1]:
2021-02-27T20:18:45.134181+00:00 app[web.1]: Consider defining a bean of type
'org.springframework.security.oauth2.jwt.JwtDecoder' in your configuration.
Run Code Online (Sandbox Code Playgroud)
网络安全配置:
@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected …Run Code Online (Sandbox Code Playgroud)