簡體   English   中英

無法在 NodeJs firebase 初始化項目中添加 puppeteer 庫?

[英]Can't add puppeteer library inside the NodeJs firebase initialised project?

I created firebase cloud function project using firebase init then i tried to add the puppeteer using npm install pupeteer but it is creating a separate node modules outside the functions. 這里出了什么問題,為什么我不能在 function 節點模塊中添加 puppeteer 庫?

圖像

如果我們使用 firebase CLI 啟動 NodeJS 項目, index.js文件將位於帶有節點模塊的函數文件夾中(如上圖所示)。 因此,為了添加任何其他庫,我們必須導航到 function 文件夾,然后我們要添加我們的庫 在問題中我們必須添加 pupeteer 庫所以

npm install --save puppeteer

因此,puppeteer 庫將與 firebase 節點模塊一起保存。 不會有兩個節點模塊。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM