
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-openlayers7
Advanced tools
React components for Openlayers7 maps.
npm install react-openlayers7 ol
로컬에서 개발 중인 react-openlayers7를 외부 프로젝트에서 사용하려면 npm link를 사용할 수 있습니다.
# 라이브러리 빌드
npm run prepare
# 전역 심볼릭 링크 생성
npm link
# react-openlayers7에 링크 생성
npm link react-openlayers7
⚠️ Peer Dependency 충돌 오류가 발생하는 경우
외부 프로젝트에서 storybook 등 다른 패키지의 peer dependency 충돌로 오류가 발생하는 경우, 다음 옵션 중 하나를 사용하세요:
# 방법 1: legacy-peer-deps 플래그 사용 (권장)
npm link react-openlayers7 --legacy-peer-deps
# 방법 2: .npmrc 파일에 설정 추가
echo "legacy-peer-deps=true" >> .npmrc
npm link react-openlayers7
import { MapContainer } from "react-openlayers7";
외부 프로젝트에서 링크를 해제하려면:
# 방법 1: npm unlink 사용
npm unlink react-openlayers7
# 방법 2: 오류가 발생하는 경우 .npmrc 파일 설정 후 재시도
# 외부 프로젝트 루트에 .npmrc 파일 생성/수정:
# legacy-peer-deps=true
⚠️ npm unlink에서 peer dependency 오류가 발생하는 경우:
.npmrc 파일에 legacy-peer-deps=true를 설정하거나, 수동으로 심볼릭 링크를 제거할 수 있습니다:
# .npmrc 파일에 설정 추가
echo "legacy-peer-deps=true" >> .npmrc
# 그 다음 unlink 실행
npm unlink react-openlayers7
# 또는 수동으로 node_modules에서 제거
rm -rf node_modules/react-openlayers7
npm run prepare를 다시 실행해야 합니다.dist/index.d.ts)도 함께 링크됩니다..npmrc 파일에 legacy-peer-deps=true를 설정하면 모든 npm 명령에 적용됩니다.이 라이브러리는 OpenLayers CSS를 자동으로 import합니다. 하지만 Next.js를 사용하는 경우 추가 설정이 필요할 수 있습니다.
Next.js에서 다음과 같은 오류가 발생하는 경우:
Global CSS cannot be imported from within node_modules.
다음과 같이 해결할 수 있습니다:
방법 1: next.config.js 설정 (권장)
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ["react-openlayers7"],
webpack: (config) => {
config.module.rules.push({
test: /\.css$/,
use: ["style-loader", "css-loader"],
});
return config;
},
};
module.exports = nextConfig;
방법 2: CSS를 직접 import
// _app.js 또는 layout.js에서
import "ol/ol.css";
방법 3: CSS 모듈 사용
// next.config.js에서
const nextConfig = {
experimental: {
esmExternals: "loose",
},
};
Next.js를 사용하는 경우, next.config.js에서 CSS import를 허용하도록 설정할 수 있습니다:
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ["react-openlayers7"],
webpack: (config) => {
config.module.rules.push({
test: /\.css$/,
use: ["style-loader", "css-loader"],
});
return config;
},
};
module.exports = nextConfig;
MIT
FAQs
React Component for using openlayers7
The npm package react-openlayers7 receives a total of 61 weekly downloads. As such, react-openlayers7 popularity was classified as not popular.
We found that react-openlayers7 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.