akdlswjf2
@akdlswjf21764
Reviews Written
1
Average Rating
5.0
Posts
Q&A
๋ก์ง์ด ๋ ์ค๋ฅด์ง ์์ต๋๋ค...
where ์กฐ๊ฑด๋ฌธ์ ์๋ฒ์ชฝ์์ ์ฌ์ฉํฉ๋๋ค!! ํ์ฌ ์ฝ๋๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค ์๋ฒ์ชฝ ์ฝ๋๋ ์ ์ฒด ์ฝ๋๊ฐ ์๋ ์กฐํ๋ก์ง์ ์ฌ์ฉ๋๋ ์ฝ๋๋ค๋ก ์ฌ๋ ค๋ณด์์ต๋๋ค! ๋ฌธ์ ์ ์ด ๋ฉ์ธํ์ด์ง์์ ์ฌ์ฉ์์ ์ ๋ ฅ๊ฐ์ ์ ๋ ํธํ๊ณ ๊ฒ์์ ๋๋ ์ ๋, ํด๋น ์กฐ๊ฑด์ ๋ง๋ ๋ฐฉ์ด ์ถ๋ ฅ๋๋ ๊ฒ์ด ์๋ ๋๋น์ ์๋ ๋ชจ๋ ๋ฐฉ๋ค์ด ์ถ๋ ฅ์ด ๋ฉ๋๋ค. F12๋ฒํผ์ ๋๋ฌ ์ฝ์์ฐฝ์ ํ์ธํด๋ณธ ๊ฒฐ๊ณผ ๋๋น์ ์๋ ๋ชจ๋ ๋ฐฉ๋ค์ด ์ฐํ๋ ๊ฒ์ด ์ง๊ธ์ ๋ฌธ์ ์ ๊ฐ์ต๋๋ค. window.location.href = "/search"; ํ์ง๋ง ํด๋น ์ฝ๋๊ฐ ๋ฌธ์ ์ธ๊ฑด์ง search ํ์ด์ง์์ ์ด ์ฝ๋๋ฅผ ์ฃผ์์ฒ๋ฆฌ๋ฅผ ํ๊ณ ์ฌ์ฉ์์ ์ ๋ ฅ๊ฐ์ ์ ๋ ํ๊ณ ๊ฒ์๋ฒํผ์ ๋๋ ์ ๋ ์ฌ์ฉ์๊ฐ ์ ๋ ฅํ ๋ด์ฉ๋ค์ด ์ฝ์์ ์ฐํ๋๋ค. ์๋ฒ์์ ์ฐํ๋ ์ฝ์์ ๋๋ค. Executing (default): SELECT `id`, `address1`, `address2`, `address3`, `address4`, `datein`, `dateout`, `roomtype`, `people`, `price`, `description`, `imageurl` FROM `Rooms` AS `Rooms` WHERE `Rooms`.`address1` = '์ธ์ฒ' AND `Rooms`.`address2` = '๋ฏธ์ถํ๊ตฌ' AND `Rooms`.`datein` = '2021-04-25' AND `Rooms`.`dateout` = '2021-04-28' AND `Rooms`.`roomtype` = '2' AND `Rooms`.`people` = '2' ORDER BY `Rooms`.`createdAt` DESC; { address1: '์ธ์ฒ', address2: '๋ฏธ์ถํ๊ตฌ', datein: '2021-04-25', dateout: '2021-04-28', roomtype: '2', people: '2' } Rooms : [ { id: 17, address1: '์ธ์ฒ', address2: '๋ฏธ์ถํ๊ตฌ', address3: '์ฉํ๋', address4: '์ฉํ๋ 12-345', datein: '2021-04-25', dateout: '2021-04-28', roomtype: '2', people: '2', price: 50000, description: '์ผ๊ฒฝ์ด ๋ฉ์ง ๋ฐฉ', imageurl: '/roomImages/s1.png' } ๋จ, ์ด ์ฝ๋๋ฅผ ์ฃผ์์ผ๋ก ํ์์ ๋๋ ๊ฒ์๋ฒํผ์ ๋๋ฅด๋ ๋์์ ์ฝ์์๋ ์ฌ์ฉ์๊ฐ ์ ๋ ฅํ ๊ฐ์ด ์ฐํ์ง ์๊ณ ๋๋น์ ์๋ ๋ชจ๋ ๋ฐฉ๋ค์ด ์ฐํ๊ณ ํ๋ฉด์ ์ถ๋ ฅ๋ฉ๋๋ค. ๋ฉ์ธํ์ด์ง์์ ์ฌ์ฉ์์ ์ ๋ ฅ๊ฐ์ ์ ๋ ํ๊ณ ๊ฒ์๋ฒํผ์ ๋๋ ์ ๋ ํด๋น ์ฝ์์ด ์๋ฒ์ชฝ์ ์ฐํ๋๋ค. ์๋ฒ์ ์ฐํ ์ฝ์์ ์ฟผ๋ฆฌ๋ฅผ ํ๋๋ ๊ฐ์ ธ์ค์ง ๋ชปํ๋ ๊ฒ์ ํ์ธํ์๊ณ ๊ฐ๋จํ ํ ์คํธ๋ฅผ ์งํํด๋ดค์ต๋๋ค. location.href = "/search?addr1=" + values.addr1 + "&addr2=" + values.addr2; ์ด๋ ๊ฒ ํ์์ ๋ ๊ฐ์ ์ ๋๋ก ์ ๋ฌํด์ฃผ์ง ์์๋๋ผ๋ฉด addr1=undefined์ด ์ฐํ์ผ์ง ๋ง์ง๋ง ์ ์ ๊ฐ ์ ๋ ฅํ ๊ฐ ๊ทธ๋๋ก URL์ ์ก์ถ์ด ๋ฉ๋๋ค. ํ์ง๋ง ์๋ฒ ์ฝ์์๋ ์ ์ ๊ฐ ์ ๋ ฅํ ๊ฐ์ ํ๋๋ ๋์ค์ง ์์ต๋๋ค. {} Executing (default): SELECT `id`, `address1`, `address2`, `address3`, `address4`, `datein`, `dateout`, `roomtype`, `people`, `price`, `description`, `imageurl` FROM `Rooms` AS `Rooms` ORDER BY `Rooms`.`createdAt` DESC; Rooms : [ { id: 30, address1: '์ธ์ฒ', address2: '๋ฏธ์ถํ๊ตฌ', address3: '์ฉํ๋', address4: '๋ฐฑํธ์คํผ์คํ ', datein: '2021-04-12', dateout: '2021-04-13', roomtype: '2', people: '2', price: 80000, description: '๋ฌธํ์ ๊ฑฐ๋ฆฌ 7๋ถ๊ฑฐ๋ฆฌ ์ต์ ์ ์คํผ์คํ ์ ๋๋ค.', imageurl: '/roomImages/s9.png' }, { id: 25, address1: '์ธ์ฒ', address2: '๋ถํ๊ตฌ', address3: '์ฉํ๋', address4: 'State์คํผ์คํ ', datein: '2021-04-27', dateout: '2021-04-28', roomtype: '2', people: '2', price: 80000, description: '๋ฌธํ์ ๊ฑฐ๋ฆฌ 8๋ถ๊ฑฐ๋ฆฌ ์ต์ ์ ์คํผ์คํ ์ ๋๋ค.', imageurl: '/roomImages/s8.png' }, { id: 24, address1: '์ธ์ฒ', address2: '๋๊ตฌ', address3: '์ฉํ๋', address4: '๋ฒ ์คํธ์คํผ์คํ ', datein: '2021-04-27', dateout: '2021-04-28', roomtype: '2', people: '2', price: 80000, description: '๋ฌธํ์ ๊ฑฐ๋ฆฌ 5๋ถ๊ฑฐ๋ฆฌ ์ต์ ์ ์คํผ์คํ ์ ๋๋ค.', imageurl: '/roomImages/s7.png' }, { id: 23, address1: '์ธ์ฒ', address2: '์ฐ์๊ตฌ', address3: '์ฉํ๋', address4: '์ผ์ด์คํผ์คํ ', datein: '2021-04-29', dateout: '2021-04-30', roomtype: '2', people: '2', price: 80000, description: '๋ฌธํ์ ๊ฑฐ๋ฆฌ 3๋ถ๊ฑฐ๋ฆฌ ์ต์ ์ ์คํผ์คํ ์ ๋๋ค.', imageurl: '/roomImages/s6.png' }, { id: 22, address1: '์ธ์ฒ', address2: '์๊ตฌ', address3: '์ฉํ๋', address4: '์ ์ด์คํผ์คํ ', datein: '2021-04-28', dateout: '2021-04-29', roomtype: '2', people: '2', price: 80000, description: '์ธํ๋์ญ 2๋ฒ ์ถ๊ตฌ 10๋ถ๊ฑฐ๋ฆฌ ์ต์ ์ ์คํผ์คํ ์ ๋๋ค.', imageurl: '/roomImages/s5.png' }, { id: 21, address1: '์ธ์ฒ', address2: '๋ถํ๊ตฌ', address3: '์ฉํ๋', address4: '๋ง๋ก์คํผ์คํ ', datein: '2021-04-27', dateout: '2021-04-28', roomtype: '2', people: '2', price: 80000, description: '์ธํ๋์ญ 2๋ฒ ์ถ๊ตฌ 15๋ถ๊ฑฐ๋ฆฌ ์ต์ ์ ์คํผ์คํ ์ ๋๋ค.', imageurl: '/roomImages/s4.png' }, { id: 20, address1: '์ธ์ฒ', address2: '์ค๊ตฌ', address3: '์ฉํ๋', address4: 'ํฌ๋ง๋น์คํผ์คํ ', datein: '2021-04-27', dateout: '2021-04-28', roomtype: '2', people: '2', price: 80000, description: '๋ ผํ์ญ 2๋ฒ ์ถ๊ตฌ 3๋ถ๊ฑฐ๋ฆฌ ์ต์ ์ ์คํผ์คํ ์ ๋๋ค.', imageurl: '/roomImages/s3.png' }, { id: 19, address1: '์ธ์ฒ', address2: '๋จ๋๊ตฌ', address3: '๋ฌธํ๋', address4: '๋ฌธํ๋ 77-777', datein: '2021-04-26', dateout: '2021-04-28', roomtype: '2', people: '2', price: 30000, description: 'ใ ใ ใดใ ใ ใด', imageurl: '/roomImages/s2.png' }, { id: 17, address1: '์ธ์ฒ', address2: '๋ฏธ์ถํ๊ตฌ', address3: '์ฉํ๋', address4: '์ฉํ๋ 12-345', datein: '2021-04-25', dateout: '2021-04-28', roomtype: '2', people: '2', price: 50000, description: '์ผ๊ฒฝ์ด ๋ฉ์ง ๋ฐฉ', imageurl: '/roomImages/s1.png' } const express = require("express"); const cors = require("cors"); const app = express(); const models = require("./models"); const port = 8090; const multer = require("multer"); const addroom = multer({ storage: multer.diskStorage({ destination: function (req, file, cb) { cb(null, "addroom/"); // ์ด๋ฏธ์ง ์ ์ฅ ๊ฒฝ๋ก }, filename: function (req, file, cb) { cb(null, file.originalname); // ์ด๋ฏธ์ง ํ์ผ ์ด๋ฆ ์ค์ }, }), }); app.use(express.json()); app.use(cors()); app.use("/addroom", express.static("addroom")); app.get("/search", (req, res) => { console.log(req.body); //console.log(req.query); // ์ฌ์ฉ์์ ์ ๋ ฅ์ ๋ฐํ์ผ๋ก ๊ฒ์ ๊ธฐ๋ฅ ํํฐ ๋ก์ง const whereOption = {}; if (req.query.address1 && typeof req.query.address1 === "string") { whereOption["address1"] = req.query.address1; } if (req.query.address2 && typeof req.query.address2 === "string") { whereOption["address2"] = req.query.address2; } if (req.query.datein && typeof req.query.datein === "string") { whereOption["datein"] = req.query.datein; } if (req.query.dateout && typeof req.query.dateout === "string") { whereOption["dateout"] = req.query.dateout; } if (req.query.roomtype && typeof req.query.roomtype === "string") { whereOption["roomtype"] = req.query.roomtype; } if (req.query.people && typeof req.query.people === "string") { whereOption["people"] = req.query.people; } models.Rooms.findAll({ order: [["createdAt", "DESC"]], // ๋ฐฉ ์กฐํ ์ ๋ ฌ (์ค๋ฆ์ฐจ์) ๋ก์ง -> ์ต๊ทผ์ ๋ฑ๋กํ ๋ฐฉ์ด ๋จผ์ ๋ณด์ด๊ฒ๋ ์ค์ ํ๊ธฐ ์ํด์ attributes: [ "id", "address1", "address2", "address3", "address4", "datein", "dateout", "roomtype", "people", "price", "description", "imageurl", ], // ๊ฐ์ ธ์ค๊ณ ์ถ์ ๋ฐ์ดํฐ๋ง ๋ฐ์์ฌ ์ ์๋ ๋ก์ง where: { ...whereOption, }, raw: true, }) .then((result) => { console.log("Rooms : ", result); res.send({ Rooms: result, }); }) .catch((error) => { console.error(error); res.status(400).send("์๋ฌ ๋ฐ์"); }); }); app.listen(port, () => { console.log("airtrace ์๋ฒ๊ฐ ๋์๊ฐ๊ณ ์์ต๋๋ค"); models.sequelize .sync() .then(() => { console.log("DB ์ฐ๊ฒฐ ์ฑ๊ณต!"); }) .catch((err) => { console.error(err); console.log("DB ์ฐ๊ฒฐ ์๋ฌ"); process.exit(); }); }); import "./index.css"; import { Link } from "react-router-dom"; import { Button, Form } from "antd"; import { API_URL } from "../config/constants"; import axios from "axios"; function MainPage() { const onSubmit = (values) => { console.log(values); axios .post(`${API_URL}/search`, { //์๋ฒํต์ params: { address1: values.addr1, address2: values.addr2, datein: values.datein, dateout: values.dateout, roomtype: values.roomtype, people: values.people, price: values.price, imageurl: values.imageurl, }, }) .then((result) => { console.log(result); }) .catch(function (error) { console.error(error); }); location.href = "/search"; }; return ( div> div id="header"> div id="logo"> Link to="/"> img src="../images/logo.png" id="logo" alt="logo" /> Link> div> Form className="formcss" name="๋ฐฉ๊ฒ์" onFinish={onSubmit} > div id="searchbox"> div> h4>๋์์ ํh4> Form.Item name="addr1"> select className="searchboxselect1"> option>์option> option value="์์ธ">์์ธoption> option value="์ธ์ฒ">์ธ์ฒoption> option value="๊ฒฝ๊ธฐ">๊ฒฝ๊ธฐoption> option value="๊ฐ์">๊ฐ์option> option value="๋์ ">๋์ option> option value="๋๊ตฌ">๋๊ตฌoption> option value="์ถฉ์ฒญ">์ถฉ์ฒญoption> option value="์ ๋ผ">์ ๋ผoption> option value="๊ฒฝ์">๊ฒฝ์option> option value="์ ์ฃผ">์ ์ฃผoption> select> Form.Item> div> div> h4>๊ตฌ์ ํh4> Form.Item name="addr2"> select className="searchboxselect2"> option>๊ตฌoption> option value="๋จ๋๊ตฌ">๋จ๋๊ตฌoption> option value="๋ฏธ์ถํ๊ตฌ">๋ฏธ์ถํ๊ตฌoption> option value="๋ถํ๊ตฌ">๋ถํ๊ตฌoption> option value="์ค๊ตฌ">์ค๊ตฌoption> option value="์๊ตฌ">์๊ตฌoption> option value="๋๊ตฌ">๋๊ตฌoption> option value="์ฐ์๊ตฌ">์ฐ์๊ตฌoption> select> Form.Item> div> div> h4>์ฒดํฌ์ธ ๋ ์งh4> Form.Item name="checkIn"> input className="searchboxcheckin" type="date" /> Form.Item> div> div> h4>์ฒดํฌ์์ ๋ ์งh4> Form.Item name="checkOut"> input className="searchboxcheckout" type="date" /> Form.Item> div> div> h4>๋ฐฉ ํ์ h4> Form.Item name="roomtype"> select className="searchboxroomtype"> option>๋ฐฉํ์ option> option value="1">1๋ฃธoption> option value="2">2๋ฃธoption> option value="3">3๋ฃธoption> select> Form.Item> div> div> h4>๋ฐฉ ์ธ์h4> Form.Item name="people"> select className="searchboxpeople"> option>์ธ์option> option value="1">1๋ช option> option value="2">2๋ช option> option value="3">3๋ช option> select> Form.Item> div> div> div id="searchclick"> Form.Item> Button id="searchbutton" size="large" htmlType="submit"> ๊ฒ์ Button> Form.Item> div> Form> div className="joinbutton"> Link to="/login"> input type="button" id="login" value="๋ก๊ทธ์ธ" /> Link> Link to="/members"> input type="button" id="signup" value="ํ์๊ฐ์ " /> Link> div> div> div id="main"> div id="maindescription"> img id="mainimg" src="../images/main2.jpg" /> div id="maincaption"> h1 className="mainh1">๋์๋ณ ๋ฐ๋ก๊ฐ๊ธฐh1> div> div id="mainboxtop"> div id="seoul"> button>์์ธbutton> div> div id="incheon"> button>์ธ์ฒbutton> div> div id="gyunggi"> button>๊ฒฝ๊ธฐbutton> div> div id="gangwon"> button>๊ฐ์button> div> div> div id="mainboxbottom"> div id="chungchung"> button>์ถฉ์ฒญbutton> div> div id="junra"> button>์ ๋ผbutton> div> div id="gyungsang"> button>๊ฒฝ์button> div> div id="jeju"> button>์ ์ฃผbutton> div> div> div id="mainbottomimg">div> div> div> div> ); } export default MainPage; import "./index.css"; import { Link } from "react-router-dom"; import { Button, Form } from "antd"; import { API_URL } from "../config/constants"; import axios from "axios"; import React from "react"; import ReactDOM from "react-dom"; import { useState, useEffect } from "react"; function searchPage() { const [rooms, setRooms] = useState([]); useEffect(function () { axios .get(`${API_URL}/search`) .then(function (result) { setRooms( result.data.Rooms.map((data) => { return data; }) ); }) .catch(function (error) { console.error("์๋ฌ ๋ฐ์ : ", error); }); }, []); const onSubmit = (values) => { //console.log("hi!"); console.log(values); axios .get(`${API_URL}/`, { params: { address1: values.addr1, address2: values.addr2, datein: values.datein, dateout: values.dateout, roomtype: values.roomtype, people: values.people, price: values.price, imageurl: values.imageurl, }, //์๋ฒํต์ }) .then((result) => { console.log(result); }) .catch(function (error) { console.error(error); }); // window.location.href = // "/search?addr1=" + values.addr1 + "&addr2=" + values.addr2; }; return ( div> div id="header"> div id="logo"> Link to="/"> img src="../images/logo.png" id="logo" alt="logo" /> Link> div> Form className="formcss" name="๋ฐฉ๊ฒ์" onFinish={onSubmit}> div id="searchbox"> div> h4>๋์์ ํh4> Form.Item name="addr1"> select className="searchboxselect1"> option>์option> option value="์์ธ">์์ธoption> option value="์ธ์ฒ">์ธ์ฒoption> option value="๊ฒฝ๊ธฐ">๊ฒฝ๊ธฐoption> option value="๊ฐ์">๊ฐ์option> option value="๋์ ">๋์ option> option value="๋๊ตฌ">๋๊ตฌoption> option value="์ถฉ์ฒญ">์ถฉ์ฒญoption> option value="์ ๋ผ">์ ๋ผoption> option value="๊ฒฝ์">๊ฒฝ์option> option value="์ ์ฃผ">์ ์ฃผoption> select> Form.Item> div> div> h4>๊ตฌ์ ํh4> Form.Item name="addr2"> select className="searchboxselect2"> option>๊ตฌoption> option value="๋จ๋๊ตฌ">๋จ๋๊ตฌoption> option value="๋ฏธ์ถํ๊ตฌ">๋ฏธ์ถํ๊ตฌoption> option value="๋ถํ๊ตฌ">๋ถํ๊ตฌoption> option value="์ค๊ตฌ">์ค๊ตฌoption> option value="์๊ตฌ">์๊ตฌoption> option value="๋๊ตฌ">๋๊ตฌoption> option value="์ฐ์๊ตฌ">์ฐ์๊ตฌoption> select> Form.Item> div> div> h4>์ฒดํฌ์ธ ๋ ์งh4> Form.Item name="datein"> input className="searchboxcheckin" type="date" /> Form.Item> div> div> h4>์ฒดํฌ์์ ๋ ์งh4> Form.Item name="dateout"> input className="searchboxcheckout" type="date" /> Form.Item> div> div> h4>๋ฐฉ ํ์ h4> Form.Item name="roomtype"> select className="searchboxroomtype"> option>๋ฐฉํ์ option> option value="1">1๋ฃธoption> option value="2">2๋ฃธoption> option value="3">3๋ฃธoption> select> Form.Item> div> div> h4>๋ฐฉ ์ธ์h4> Form.Item name="people"> select className="searchboxpeople"> option>์ธ์option> option value="1">1๋ช option> option value="2">2๋ช option> option value="3">3๋ช option> select> Form.Item> div> div> div id="searchclick"> Form.Item> Button id="searchbutton" size="large" htmlType="submit"> ๊ฒ์ Button> Form.Item> div> Form> div className="joinbutton"> Link to="/hostroom"> input type="button" id="login" value="๋ฐฉ๊ด๋ฆฌ" /> Link> Link to="/cusroom"> input type="button" id="signup" value="์์ฝ๊ด๋ฆฌ" /> Link> div> div> div className="roomListBox"> {rooms.map((room, index) => { console.log(room); return ( div className="roomBox" key={index}> Link className="room-link" to={`/reservation/${room.id}`}> img className="roomBoxImg" src={room.imageurl} /> div className="roomInfo"> strong> ์ฃผ์ : {room.address1} {room.address2} {room.address3} strong> p>๊ฐ๊ฒฉ : {room.price}์ (1๋ฐ)p> p>๊ธฐ์ค ์ธ์ : {room.people}๋ช p> div> Link> div> ); })} div> div> ); } export default searchPage;
- 1
- 3
- 437
Q&A
๋ก์ง์ด ๋ ์ค๋ฅด์ง ์์ต๋๋ค...
๊ทธ๋ฌ๋ฉด ์กฐ๊ฑด๊ฐ์ ํญ์ ๋ฌ๋ผ์ง๋ ์ด๋ฐ ์์ผ๋ก ์ฒ๋ฆฌ๋ฅผ ํด์ฃผ๋ฉด ๋๋ค๋ ๋ง์์ด์ ๊ฐ์? ๊ทธ๋ฆฌ๊ณ ์๋ฒ์์๋ ์ด ์ฟผ๋ฆฌ ์คํธ๋ง์ ๊ฐ์ ์ด๋ค ์์ผ๋ก ์ฒ๋ฆฌํ๊ฒ ๋๋์? axios.get('https://apiserver.com', { params: { number: ์ ์ ์ ์ ๋ ฅ๊ฐ date : ์ ์ ์ ์ ๋ ฅ๊ฐ } })
- 1
- 3
- 437
Q&A
tensorflow ์ค์น ์ค๋ฅ ์ง๋ฌธ ๋๋ฆฝ๋๋ค.
๊ทธ๋ฉ๋??
- 1
- 13
- 1.8K
Q&A
tensorflow ์ค์น ์ค๋ฅ ์ง๋ฌธ ๋๋ฆฝ๋๋ค.
ํ์ฌ npm install --global windows-build-tools์ ๊ด๋ฆฌ์ ๊ถํ์ผ๋ก success ์ฐฝ๊น์ง ๋์จ ๊ฑธ ํ์ธํ๊ณ ๋ค์ VS๋ก ๋ค์ด์์ npm install @tensorflow/tfjs-node์ ์คํํ ๊ฒฐ๊ณผ npm ERR! @tensorflow/tfjs-node@3.2.0 install: `node scripts/install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @tensorflow/tfjs-node@3.2.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\ASROCK\AppData\Roaming\npm-cache\_logs\2021-03-05T04_15_20_158Z-debug.log ์ค๋ฅ๊ฐ ๋ฐ์ํ์๊ณ ํ์ด์ฌ์ ์ง๊ธ 2.7๋ฒ์ ํ๋๋ง ๊น๋ฆฐ ์ํ์ ๋๋ค.....
- 1
- 13
- 1.8K
Q&A
tensorflow ์ค์น ์ค๋ฅ ์ง๋ฌธ ๋๋ฆฝ๋๋ค.
์ ๊ฐ ์ง๊ธ์ ํ์ธํ ์ ์๋ ์ํฉ์ด๋ผ 3.4์ ํ์ธ ํด๋ณด๊ฒ ์ต๋๋คใ ใ ใ ใ ์ผ๋ฅธ ๋ค์ ๊ฐ์๋ฅผ ๋ฃ๊ณ ์ถ์ด์ใ ใ ใ
- 1
- 13
- 1.8K
Q&A
tensorflow ์ค์น ์ค๋ฅ ์ง๋ฌธ ๋๋ฆฝ๋๋ค.
PS C:\Users\ASROCK\Documents\inflearn-nodejs> npm install --global windows-build-tools npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported > windows-build-tools@5.2.2 postinstall C:\Users\ASROCK\AppData\Roaming\npm\node_modules\windows-build-tools > node ./dist/index.js ... and 1 more Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\ASROCK\.windows-build-tools\python-2.7.15.amd64.msi. ... and 1 more Downloaded vs_BuildTools.exe. Saved to C:\Users\ASROCK\.windows-build-tools\vs_BuildTools.exe. Starting installation... Please restart this script from an administrative PowerShell! The build tools cannot be installed without administrative rights. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! windows-build-tools@5.2.2 postinstall: `node ./dist/index.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the windows-build-tools@5.2.2 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\ASROCK\AppData\Roaming\npm-cache\_logs\2021-03-01T10_42_02_967Z-debug.log PS C:\Users\ASROCK\Documents\inflearn-nodejs> npm i -g node-pre-gyp npm WARN deprecated node-pre-gyp@0.17.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future C:\Users\ASROCK\AppData\Roaming\npm\node-pre-gyp -> C:\Users\ASROCK\AppData\Roaming\npm\node_modules\node-pre-gyp\bin\node-pre-gyp + node-pre-gyp@0.17.0 added 66 packages from 25 contributors in 7.18s ์ด ์ญ์ ์๋ฉ๋๋คใ
- 1
- 13
- 1.8K
Q&A
tensorflow ์ค์น ์ค๋ฅ ์ง๋ฌธ ๋๋ฆฝ๋๋ค.
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @tensorflow/tfjs-node@3.2.0 install: `node scripts/install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @tensorflow/tfjs-node@3.2.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\ASROCK\AppData\Roaming\npm-cache\_logs\2021-02-28T17_25_46_366Z-debug.log ๋ ์๋ฌ๊ฐ ๋ฐ์ํฉ๋๋ค ใ ใ
- 1
- 13
- 1.8K
Q&A
tensorflow ์ค์น ์ค๋ฅ ์ง๋ฌธ ๋๋ฆฝ๋๋ค.
์ฌ์ ํ ์๋ฌ๊ฐ ๋ฐ์ํฉ๋๋ค. node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Tried to download(404): https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v7/3.2.0/CPU-windows-3.2.0.zip node-pre-gyp WARN Pre-built binaries not found for @tensorflow/tfjs-node@3.2.0 and node@14.15.4 (node-v83 ABI, unknown) (falling back to source compile with node-gyp) gyp ERR! find Python gyp ERR! find Python Python is not set from command line or npm configuration gyp ERR! find Python Python is not set from environment variable PYTHON gyp ERR! find Python checking if "python" can be used gyp ERR! find Python - "python" is not in PATH or produced an error gyp ERR! find Python checking if "python2" can be used gyp ERR! find Python - "python2" is not in PATH or produced an error gyp ERR! find Python checking if "python3" can be used gyp ERR! find Python - "python3" is not in PATH or produced an error gyp ERR! find Python checking if the py launcher can be used to find Python 2 gyp ERR! find Python - "py.exe" is not in PATH or produced an error gyp ERR! find Python checking if Python is C:\Python27\python.exe gyp ERR! find Python - "C:\Python27\python.exe" could not be run gyp ERR! find Python checking if Python is C:\Python37\python.exe gyp ERR! find Python - "C:\Python37\python.exe" could not be run gyp ERR! find Python gyp ERR! find Python ********************************************************** gyp ERR! find Python You need to install the latest version of Python. gyp ERR! find Python Node-gyp should be able to find and use Python. If not, gyp ERR! find Python you can try one of the following options: gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe" gyp ERR! find Python (accepted by both node-gyp and npm) gyp ERR! find Python - Set the environment variable PYTHON gyp ERR! find Python - Set the npm configuration variable python: gyp ERR! find Python npm config set python "C:\Path\To\python.exe" gyp ERR! find Python For more information consult the documentation at: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation gyp ERR! find Python ********************************************************** gyp ERR! find Python gyp ERR! configure error gyp ERR! stack Error: Could not find any Python installation to use gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47) gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21) gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16) gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16) gyp ERR! stack at exithandler (child_process.js:315:5) gyp ERR! stack at ChildProcess.errorhandler (child_process.js:327:5) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! stack at onErrorNT (internal/child_process.js:465:16) gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21) gyp ERR! System Windows_NT 10.0.18362 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\ASROCK\\Documents\\inflearn-nodejs\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v7\\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\\Users\\ASROCK\\Documents\\inflearn-nodejs\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v7" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=7" "--node_napi_label=napi-v7" gyp ERR! cwd C:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node gyp ERR! node -v v14.15.4 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node\lib\napi-v7\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node\lib\napi-v7 --napi_version=7 --node_abi_napi=napi --napi_build_version=7 --node_napi_label=napi-v7' (1) node-pre-gyp ERR! stack at ChildProcess. (C:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) node-pre-gyp ERR! System Windows_NT 10.0.18362 node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ASROCK\\Documents\\inflearn-nodejs\\node_modules\\@tensorflow\\tfjs-node\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node node-pre-gyp ERR! node -v v14.15.4 node-pre-gyp ERR! node-pre-gyp -v v0.14.0 node-pre-gyp ERR! not ok npm WARN inflearn-nodejs@1.0.0 No description npm WARN inflearn-nodejs@1.0.0 No repository field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @tensorflow/tfjs-node@3.2.0 install: `node scripts/install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @tensorflow/tfjs-node@3.2.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\ASROCK\AppData\Roaming\npm-cache\_logs\2021-02-28T11_11_06_347Z-debug.log
- 1
- 13
- 1.8K
Q&A
TypeError: Cannot read property 'map' of undefined
์ ๊ฐ ๊ฐ์๋ฅผ ๋ค์ ๋๋ ค๋ดค๋๋ ํฌ์คํธ๋งจ์ example ์ชฝ์ ์คํ์๋ฅผ ๋ฐ๊ฒฌํ์ต๋๋ค! ์ง๊ธ์ ํด๊ฒฐํ ์ํ์ ๋๋ค. ๋ต๋ณ ๊ฐ์ฌํฉ๋๋ค ใ
- 2
- 7
- 896
Q&A
TypeError: Cannot read property 'map' of undefined
์ด๋ ๋ถ๋ถ ์ฝ๋๋ฅผ data.products๋ก ๋ฐ๊พธ๋ฉด ๋๋์!?
- 2
- 7
- 896




