Error:  You are using an unsupported version of Node. Please update to at least Node v12.14
    at assertSupportedNodeVersion

Error:  You are using an unsupported version of Node. Please update to at least Node v12.14 at assertSupportedNodeVersion

그래서 업데이트를 진행하였는데 추가적인 에러가발생하여 node 자체를 지우고 재설치를 하게되었다.

 

 

1. node.js 제거 과정 (디렉터리와 bash 내용을 전부 삭제)

sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules 

sudo rm -rf /usr/local/lib/node* ; sudo rm -rf /usr/local/include/node* ; sudo rm -rf /usr/local/bin/node*

sudo apt-get purge nodejs npm

 

2. node.js 설치과정

sudo apt install nodejs

sudo apt install npm

// cache 제거. 안해주시면 에러 발생가능성이 있습니다.
sudo npm cache clean -f 

// 전역에서 사용가능하게 npm을 n이라는 이름으로 다운로드
sudo npm install -g n

// 안정화 버전을 설치
sudo n stable

 

3. 확인

node -v
v16.13.0

npm -v
8.1.0

 

 

자꾸 오류 나고 그래서 삭제만 8번 넘게 진행한 것 같네요.

억울하고 분통터져

원래 뭘 진행하려고 했는지도 머리속에서 증발하게 되었습니다. ㅎㅎ 
다시 무엇을 하려고했는지 떠나요~

 

 

참고

 

[Node] Node.js, NPM 최신버전으로 업그레이드하기

기존 node.js 가 설치 되어 있다고 가정하에 업그레이드를 진행합니다. Node.js Upgrade 1. 현재 Node.js 버전확인 $ node -v 2. cache 삭제 $ sudo npm cache clean -f 3. n 모듈 설치 $ sudo npm install -g n 4..

eomtttttt-develop.tistory.com

 

npm Error: Cannot find module 'semver'

I get the following error when I try to run npm command root@localhost:# npm --version internal/modules/cjs/loader.js:584 throw err; ^ Error: Cannot find module 'semver'...

superuser.com

 

 

Ubuntu – Npm can’t find module “semver” error in Ubuntu 19.04 – iTecTec

I am getting the following error whenever I try to run npm command. internal/modules/cjs/loader.js:626 throw err; ^ Error: Cannot find module 'semver' Require stack: - /usr/share/npm/lib/utils/unsupported.js - /usr/share/npm/bin/npm-cli.js at Function.Modu

itectec.com

기타 등등..

반응형
반응형

안녕하세요 상훈입니다.

Spring에서 css 경로를 잡아주도록 하겠습니다. [ jsp example css path ]

실제 경로

실제 경로는 
"src/main/webapp/resources/css/cssfilename.css" 인데요,

이걸 다 써줄 수도 없으니, jsp 파일에서 작성할 link부분을 바로 작성하도록 하겠습니다.

<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/addrbook.css" type="text/css" media="screen" />

${pageContext.request.contextPath} 를 넣어주는겁니다.

 

이상입니다.

반응형

안녕하세요 상훈입니다.

Laravel(라라벨) 의 style을 Bootstrap 의 css로 자동 지정하게 하는 방법을 포스팅하겠습니다.

* 필요사항 : Npm, Composer, Laravel

1. 프로젝트 생성
2. 프로젝트 내로 이동
3. ui설치
4. Bootstrap으로 ui를 지정
5. npm install 를 통한 최신버전 설치
6. 확인(route + view + css 적용 확인)

 

 

1. 프로젝트 생성

$ composer create-project laravel/laravel 프로젝트이름

 

2. 프로젝트 내로 이동

$ cd 프로젝트 이름

 

3. ui 설치

$ composer require laravel/ui

 

4. Bootstrap으로 ui를 지정

$ php artisan ui bootstrap

 

5. npm install

$ npm install 

 

 

 

6. 확인(view + css 적용 확인 + route )

- view

새로운 view 파일 한개를 생성합니다.  저는 test.blade.php 로 하겠습니다.

<link rel="stylesheet" href="{{ asset('css/app.css') }}">

<input type="text" class="form-control">
<button class="btn btn-primary">save</button>

cdn을 따오는 것이 아닌 asset() 을 이용한 default css 경로 지정입니다.

 

- web.php

Route::get('/test', function () {
    return view('test');
});

 

7. LAST - 결과확인

$ php artisan serve
// 다른 bash
$ npm install & npm run watch

 

localhost:8000/test 로 접속하면,

결과 확인

 

css가 적용되어져 있는 것을 확인하실 수 있습니다.

 

이상입니다.

 

 

 


참고

 

Introduction

Get started with Bootstrap, the world’s most popular framework for building responsive, mobile-first sites, with BootstrapCDN and a template starter page.

getbootstrap.com

 

https://www.positronx.io/how-to-properly-install-and-use-bootstrap-in-laravel/

 

www.positronx.io

 

 

 

반응형

안녕하세요 상훈입니다.

java.lang.NoClassDefFoundError: org/springframework/beans/factory/config/EmbeddedValueResolver

에러해결에 대해 포스팅하겠습니다.

 

해당 내용은 pom.xmldependency추가하는 것으로 해결이 가능합니다.

<!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-jdbc</artifactId>
    <version>5.0.20.RELEASE</version>
</dependency>

 

dependency에 작성해주시면됩니다. 저장 필수!

 

 

↓아래의 maven 글이 안들어가지는 현상이 발생하더라구요... 그냥 위의 코드를 복사하시는 것을 추천드립니다.

https://mvnrepository.com/artifact/org.springframework/spring-jdbc/5.0.20.RELEASE

 

 

참고

 

java.lang.NoClassDefFoundError: org/springframework/beans/factory/config/EmbeddedValueResolver

I've recently managed to upgrade a jhipster generated app (Spring Boot + Angular) Issue comes after cleaning code and adapting a few annotations, now I get success when doing a maven clean - install

stackoverflow.com

 

반응형

안녕하세요 상훈입니다.

java.lang.ClassNotFoundException: org.springframework.dao.support.PersistenceExceptionTranslator

 

에러 해결에 대해 포스팅하겠습니다.

내용은 아주 간단합니다. pom.xmlspring-dao dependency가 없다는 것입니다.

바로 추가해보도록하죠 

<!-- https://mvnrepository.com/artifact/org.springframework/spring-dao -->
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-dao</artifactId>
    <version>2.0.8</version>
</dependency>

해당 내용을 pom.xml -> dependency 에 작성해주시면 됩니다.

 

dependencies 내에 작성한다.

 

마우스 클릭하면 바로 복사가 됩니다. 편리하게 사용하세요!

 

https://mvnrepository.com/artifact/org.springframework/spring-dao/2.0.8

 

 

참고 

 

java.lang.ClassNotFoundException: org.springframework.dao.support.PersistenceExceptionTranslator

I have created a spring boot web project using a 2.1.8 version of boot from https://start.spring.io/. When I run the project, it throws the error: java.lang.ClassNotFoundException: org.springfram...

stackoverflow.com

 

반응형

안녕하세요 상훈입니다.

maven 프로젝트 빌드 중에 에러가 발생하였습니다.

Maven error Cannot access defaults field of Properties
Could not initialize class org.apache.maven.plugin.war.util.WebappStructureSerializer

 

이 두가지의 경우 입니다.

 

 stackoverflow에 등록된 내용으로 살펴보았을 때

 

Maven error Cannot access defaults field of Properties

I use the newest version of Java -> 16. When I run mvn clean, I am getting Could not initialize class org.apache.maven.plugin.war.util.WebappStructureSerializer error. I read that adding maven-war-

stackoverflow.com

 

프로젝트의 pom.xml 의 하단부plugin 이 있는데, 해당 내용을 변경해주시면 됩니다.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>3.3.1</version>
</plugin>
<plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.8.1</version>
</plugin>

 

신경써야할 부분은 오직 <artifactId><version> 이니, 다른 추가적인 내용은 무시하셔도됩니다.

artifactId가 일치하는지, version을 최신화 해주었는지 확인해주시면 됩니다.

그리고 저장update(ALT +  F5).
 간혹 1-2분 후에 에러가 없음 문구가 늦게 변경되는 경우도 있으니 참고 바랍니다.

 

 

 


 

 

maven dependency 내용

https://mvnrepository.com/search?q=+maven-war-plugin 

https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin/3.8.1

 

 

참고 사이트

 

Could not initialize class org.apache.maven.plugin.war.util.WebappStructureSerializer

Could not initialize class org.apache.maven.plugin.war.util.WebappStructureSerializer 위와 같은 에러가 나올 때는 아래와 같이 플러그인을 추가해주면 된다.                   maven-war-plugin

jisblee.me

 

 

반응형

안녕하세요 상훈입니다.

Java - Spring - Maven 설정 중에 자바 버전 관련한 에러가 발생하였습니다.

Description Resource Path Location Type Dynamic Web Module 3.1 requires Java 1.7 or newer. my-spring-mvc line 1 Maven Java EE Configuration Problem

이는 해당 자바 버전이 현재 컴파일러 버전 수준에 미달되거나 설정되지 않아 발생하는 에러입니다.

 

순서대로 따라와주시면 됩니다.

1. window - preferences

window-preferences

 

2. Java - Compiler - compliance level 설정

 Java - Compiler - 

이곳에서 본인이 사용하는 버전에 맞게 설정해주시고, 아래의 Apply를 눌러주시면 됩니다.

그리고 프로젝트 - ALT+F5프로젝트 업데이트 해주세요.

 

프로젝트 클릭하고 ALT+F5

 

 

업데이트 빌드 결과 확인

에러 해결

 

이상입니다.

 

감사합니다.

반응형

+ Recent posts