簡體   English   中英

新 Mac 上的 NPM 與從我以前的 Linux 系統傳輸的文件。 VS CODE 終端上的 npm start 問題

[英]NPM on new Mac with transferred files from my previous linux system. Problem with npm start on VS CODE terminal

嘿人們...將一些有效的 js 文件從舊的 linux 轉移到我的新 macbook air。 嘗試在 vs 代碼終端中使用 NPM 啟動我的文件時,我收到此錯誤:(請幫忙!)

Galias-MacBook-Air:react-nextagram Guy$ npm start

react-nextagram@0.1.0 start /Users/Guy/Desktop/Next Academy/react-nextagram
react-scripts start

sh: /Users/Guy/Desktop/Next Academy/react-nextagram/node_modules/.bin/react-scripts: cannot execute binary file
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! react-nextagram@0.1.0 start: `react-scripts start`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the react-nextagram@0.1.0 start 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!     /Users/Guy/.npm/_logs/2019-01-24T01_15_13_056Z-debug.log
Galias-MacBook-Air:react-nextagram Guy$

我也是。 我從 Ubuntu 18.04 遷移到 OSX Catalina。 我是這樣解決的:

刪除您的 node_modules 和npm installnpm install -s問題在您的 node_modules 中

這里的問題是您已經編譯了依賴項。 您在應用程序中使用的一個或多個軟件包需要針對您將要運行它們的操作系統進行編譯。要解決此問題,您可以嘗試以下選項之一:

這將針對您當前的操作系統重建所有內容。

npm rebuild

或者

您可以進行全新安裝。

rm -rf node_modules && npm install

暫無
暫無

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

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