Git Product home page Git Product logo

hack2-qas's People

Contributors

ntuee-webprogramming avatar

Watchers

 avatar

hack2-qas's Issues

routing 更新pid

請問一下routing雖然助教寫好了,但我不確定助教是否有寫道更新Pid的部分,點到不同貼文都是同資料

Cypress todo1

資料庫有成功連結,也加入資料了,但還是沒過

postId生成問題

每則post的postId是要用甚麼生成呢?mongodb不是本來就會自動建一個id給資料嗎?

執行yarn start出現問題

我在執行yarn start/server 時 會出現internal watch failed: ENOSPC: SYStem limit for number of file watchers reached 查了一下網路不知道怎麼解決 已按照readme安裝所有東西了

MongoDB 資料

如果資料出現在之前的Database,沒有在hack2裡面,會影響考試結果嗎?

前端 src/containers/post.js

在README 文件中,題目functions說明出現路徑為
src/containers/post.js
但此次hack2沒有containers吧
要自己建立嗎

cypress 不知道怎麼測試

助教請問cypress要怎麼跑? 是不是要先裝什麼套件阿,我的電腦不認識"cypress"這個指令。另外問一下是用cypress open開嗎

關於第二題的測資

請問第二題的測資是要先用datainit下去跑嗎?
另外就是需不需要前後端都完成他才能一次work?
感謝!

Todo2 yarn test (2)通過/(1)未過

請問Todo2跑cypress,(2)通過、(1)未過是我程式有錯誤嗎?應該通常是後端要過前端才能過吧?還是有甚麼地方需要註解掉才行?

3-1沒過 3-2有過

助教你好,想請問一下我用cypress測試時3-1沒過,但3-2有過,並且我的網頁在點選文章時確實會跑出文章內容(但每一次跑出文章內容的一瞬間都會跑出"Post not found",然後就會跑出文章內容),想請問這是因為我還沒寫後面題目的問題嘛,因為我想說都已經呈獻出文章了,不知道哪裡出了問題

Network error

您好,我於測試todo 2時,前後端路徑都有按照規定打,但網頁上一直顯示network error。
請問這是能夠自行解決的嗎?

cypress第一題問題

我做到第四題時才開始跑cypress,而在我local做所有事情都很正常,server都有開起來,也能傳req到4000並傳回res,DB也有對應的動作,但在cypress中他第一題就說因為連不到server所以掛了,我確認了cypress底下的錯誤可能,包括沒有網路連線、server沒跑起來,有一句your web server isn't accessible我不是很懂,請問有可能是甚麼狀況呢?

timestamp生成問題

請問在add post時timestamp obj中要定createdAt=updatedAt嗎?還是我直接傳timestamp=new Date()就好,不用設createdAt跟updatedAt這兩個prop?

2-2問題

如果此題完成(只動用到useEffect),網頁上就會自動產生posts的畫面了,請問我有理解錯題意嗎

CORS issues

Hi,

Screenshot 2021-12-07 at 10 13 26 AM

在server.js 加上 app.use(cors()) 也沒效果qq

  • 已經yarn add cors + npm install cors

require and import issues in node.js

Hi ,

由於助教提供的ref code 都是用import,但在本端會報錯,所以改用require來import,請問這樣會影響分數嗎?

**改成require後程式能正常跑
Screenshot 2021-12-07 at 10 56 09 AM
**

測資5-1

如果刪除成功應該要剩4個post
可是為甚麼測資是expect(response.body.data).to.have.length(5) (這個在該測資最後一行)
不是應該是expect(response.body.data).to.have.length(4)嗎
還是我哪裡搞錯了

server run 不起來 ( address already in use :::4000)

events.js:377
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE: address already in use :::4000
at Server.setupListenHandle [as _listen2] (net.js:1331:16)
at listenInCluster (net.js:1379:12)
at Server.listen (net.js:1465:7)
at Function.listen (/mnt/c/Users/User/Desktop/wp1101/hack2/node_modules/express/lib/application.js:618:24)
at Object. (/mnt/c/Users/User/Desktop/wp1101/hack2/server/server.js:40:5)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Module._compile (/mnt/c/Users/User/Desktop/wp1101/hack2/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Object.newLoader [as .js] (/mnt/c/Users/User/Desktop/wp1101/hack2/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:950:32)
Emitted 'error' event on Server instance at:
at emitErrorNT (net.js:1358:8)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
code: 'EADDRINUSE',
errno: -98,
syscall: 'listen',
address: '::',
port: 4000
}
[nodemon] app crashed - waiting for file changes before starting...

貼文排序疑問

不好意思,請問README中提到�"使較新的貼文順序在前,較舊的貼文順序在後",這句話的意思是頁面中較新的文章會在最上面較舊的文章會在最下面的意思嗎?

Cypress 4-1 Race Condition

4-1 的測資貌似會因為 race condition 的原因跑出不同的結果,我有時候過有時候沒過?

dataInit()問題

想問一下dataInit()如果正確執行的話會顯示怎樣的畫面?
我目前是在mongodb重新開一個project,並照著preReadme去create database(hack2)和collection(post),並把該cluster的connection複製貼到.env中
但從mongodb那邊打開卻沒有看到任何data
想問MONGO_URL這樣寫是對的嗎?
MONGO_URL=mongodb+srv://name:[email protected]/myFirstDatabase?retryWrites=true&w=majority
image

個人電腦問題

如果是自己電腦當掉的情況想請問有補救辦法嗎?
他剛剛整個當掉現在還在重新開機
我怕連剛剛寫好的code都沒辦法push…

沒有動到cypress檔案的情況下,cypress無法測試

我在重啟使用cypress測試的終端機之後,就無法使用npm test測試了,一直顯示這個:
The plugins file is missing or invalid.
Your pluginsFile is set to C:\Users\jaspe\wp1101\hack2\cypress\plugins\index.js, but either the file is missing, it contains a syntax error, or threw an error when required. The pluginsFile must be a .js, .ts, or .coffee file.

Or you might have renamed the extension of your pluginsFile. If that's the case, restart the test runner.

Please fix this, or set pluginsFile to false if a plugins file is not necessary for your project.

Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\jaspe\wp1101\hack2\cypress\plugins\index.js from C:\Users\jaspe\AppData\Local\Cypress\Cache\9.1.1\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js not supported.
index.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in C:\Users\jaspe\wp1101\hack2\package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).

at runPlugins (C:\Users\jaspe\AppData\Local\Cypress\Cache\9.1.1\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:175:15)
at Object.<anonymous> (C:\Users\jaspe\AppData\Local\Cypress\Cache\9.1.1\Cypress\resources\app\packages\server\lib\plugins\child\index.js:8:25)

然而我完全沒有動到這些檔案。

Cypress 4-2測資

測資寫類似 expected to see "Public Test 2",但是新增的是public test 2,導致沒過,請問是助教打錯還是也應該要過?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.