簡體   English   中英

調用 Node.js v10.15.3 項目時出現問題

[英]Problem calling a Node.js v10.15.3 project

我正在加載一個 Node v10.15.3 版本的項目。 當我調用它時,一切都正確加載:

user@host:~/node-proyect/primo-explore-devenv/primo-explore/custom$ gulp run --view 49HFMN_V2 --ve
[13:53:40] Working directory changed to ~/node-proyect/primo-explore-devenv
[13:53:41] Using gulpfile ~/node-proyect/primo-explore-devenv/gulpfile.js
[13:53:41] Starting 'run'...
[13:53:41] Starting 'select-view'...
[13:53:41] Finished 'select-view' after 4.43 ms
[13:53:41] Starting 'connect:primo_explore'...
[13:53:41] Starting 'select-view'...
[13:53:41] Finished 'select-view' after 445 μs
[13:53:41] Starting '<anonymous>'...
[13:53:42] Finished '<anonymous>' after 78 ms
[13:53:42] Finished 'connect:primo_explore' after 79 ms
[13:53:42] Starting 'reinstall-primo-node-modules'...
[13:53:42] Starting 'select-view'...
[13:53:42] Finished 'select-view' after 481 μs
[13:53:42] Starting '<anonymous>'...
[13:53:42] Finished '<anonymous>' after 226 μs
[13:53:42] Finished 'reinstall-primo-node-modules' after 1.57 ms
[13:53:42] Starting 'setup_watchers'...
[13:53:42] Starting 'select-view'...
[13:53:42] Finished 'select-view' after 330 μs
[13:53:42] Starting 'watch-js'...
[13:53:42] Starting 'select-view'...
[13:53:42] Finished 'select-view' after 310 μs
[13:53:42] Starting '<anonymous>'...
[13:53:42] Finished '<anonymous>' after 10 ms
[13:53:42] Finished 'watch-js' after 11 ms
[13:53:42] Starting 'watch-custom-scss'...
[13:53:42] Starting 'select-view'...
[13:53:42] Finished 'select-view' after 402 μs
[13:53:42] Starting '<anonymous>'...
[13:53:42] Finished '<anonymous>' after 172 μs
[13:53:42] Finished 'watch-custom-scss' after 898 μs
[13:53:42] Starting 'watch-css'...
[13:53:42] Starting 'select-view'...
[13:53:42] Finished 'select-view' after 267 μs
[13:53:42] Starting '<anonymous>'...
[13:53:42] Finished '<anonymous>' after 2.68 ms
[13:53:42] Finished 'watch-css' after 3.26 ms
[13:53:42] Starting '<anonymous>'...
[13:53:42] Finished '<anonymous>' after 471 μs
[13:53:42] Finished 'setup_watchers' after 16 ms
[13:53:42] Starting 'custom-js'...
[13:53:42] Starting 'select-view'...
[13:53:42] Finished 'select-view' after 286 μs
[13:53:42] Starting 'custom-html-templates'...
[13:53:42] Starting 'select-view'...
[13:53:42] Finished 'select-view' after 248 μs
[13:53:42] Starting '<anonymous>'...
[13:53:42] Finished '<anonymous>' after 14 ms
[13:53:42] Finished 'custom-html-templates' after 14 ms
[13:53:42] Starting '<anonymous>'...
[13:53:42] Finished '<anonymous>' after 8.21 ms
[13:53:42] Finished 'custom-js' after 23 ms
[13:53:42] Starting 'custom-scss'...
[13:53:42] Starting 'select-view'...
[13:53:42] Finished 'select-view' after 511 μs
[13:53:42] Starting '<anonymous>'...
[13:53:42] Finished '<anonymous>' after 190 μs
[13:53:42] Finished 'custom-scss' after 1.18 ms
[13:53:42] Starting 'custom-css'...
[13:53:42] Starting 'select-view'...
[13:53:42] Finished 'select-view' after 254 μs
[13:53:42] Starting '<anonymous>'...
[13:53:42] Finished '<anonymous>' after 7.91 ms
[13:53:42] Finished 'custom-css' after 8.51 ms
[13:53:42] Finished 'run' after 136 ms
[Browsersync] Access URLs:
 ----------------------------------
       Local: http://localhost:8003
    External: http://127.0.0.1:8003
 ----------------------------------
          UI: http://localhost:3001
 UI External: http://localhost:3001
 ----------------------------------
[Browsersync] Serving files from: primo-explore

就在那時它一直在等待瀏覽器調用,但是當我從瀏覽器調用 web 時:

http://host_URL:8003/discovery/?vid=49HFMN:49HFMN_V2

拋出以下錯誤:

...
[Browsersync] Serving files from: primo-explore
custom/49HFMN_V2
undefined:1


SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at IncomingMessage.<anonymous> (/home/user/node-proyect/primo-explore-devenv/gulp/tasks/08-servers.js:59:53)
    at IncomingMessage.emit (events.js:194:15)
    at IncomingMessage.EventEmitter.emit (domain.js:459:23)
    at endReadableNT (_stream_readable.js:1125:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

並停止執行。

在此鏈接中,您可以找到我嘗試在 Node.js 中實施的項目,根目錄中的 package.json:

https://github.com/ExLibrisGroup/primo-explore-devenv

我該如何解決? 有任何想法嗎?

非常感謝你。

PS 我沒有太多運行 Node JS 的經驗,有沒有免費課程或教程的建議來學習如何使用它和解決錯誤?

我通過卸載所有 node.js 並使用 NVM 版本控制重新安裝所有內容來解決它,這是我以前不知道的,讓我可以更好地控制所有內容,並讓我更輕松地解決安裝問題。

簡而言之,Node.js系統出現了無法解決的問題,無葯可救,只好走激進的路。

@Naschkopf primo-explore/custom 文件夾下沒有任何文件,請檢查安裝指南的第 9 點。 在你的指揮下

 gulp run --view 49HFMN_V2 

我無法在 repo 中找到 49HFMN_V2,它必須在 primo-explore/custom 下

通過從您的 Primo 后台下載視圖代碼文件或使用 primo-explore-package GitHub 存儲庫,在自定義 package 文件夾(“...primo-explore\custom”)中填充您的自定義 View package 文件夾,以啟動一個新的 package 文件夾。 (如果您已經定義了視圖 package 並將其加載到 BO - 確保下載它,否則您將看不到並且可能會覆蓋之前的更改。)

暫無
暫無

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

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