error in npm start while running AGCloud Project in windows

huangapple go评论55阅读模式
英文:

error in npm start while running AGCloud Project in windows

问题

I'm trying to run the AGCloud project on windows 10. the project is built with React JS.

我正在尝试在Windows 10上运行AGCloud项目。该项目是使用React JS构建的。

I cloned the main branch of the repository in my system, and then installed dependencies in both front-end and back-end using npm i command and then moved to the root directory.

我在我的系统中克隆了存储库的主分支,然后使用npm i命令安装了前端和后端的依赖项,然后转到根目录。

and then I executed the following command:

然后我执行了以下命令:

npm start

I was expecting that the project will be compiled successfully

我期望该项目将成功编译

but I encountered the following error:

但是我遇到了以下错误:

error in npm start while running AGCloud Project in windows

this is error in the front-end.

这是前端的错误。

英文:

I'm trying to run the AGCloud project on windows 10. the project is built with React JS.

I cloned the main branch of the repository in my system, and then installed dependencies in both front-end and back-end using npm i command and then moved to the root directory.

and then I executed the following command:

> npm start

I was expecting that the project will be compiled successfully

but I encountered the following error:

error in npm start while running AGCloud Project in windows

this is error in the front-end.

答案1

得分: 3

您之所以会收到此错误是因为有3个不同的package.json文件,而您尚未在根目录中运行npm i

更快的方法是运行npm run setup
您可以检查位于根目录的package.json文件,其中的setup命令会自动进入每个目录以安装节点模块,
然后运行npm run start,应该可以正常工作。

英文:

You are getting this error because there are 3 different package.json files, and you haven't run npm i in the root directory.

The quicker way to do this could be that run npm run setup
You can check package.json file that's located in the root directory, there setup command automatically cd into each directory to install node modules,
Then run npm run start and it should work fine.

答案2

得分: 2

确保已安装的 npm 版本正确,并且与 AGE-Viewer 兼容。

运行以下命令,它会安装所有依赖项。

npm install

之后运行以下命令。

npm start
英文:

Ensure that the installed version of npm is correct and it is compatible with AGE-Viewer.

Run this command, it installs all the dependencies.

npm install

After that run this below command.

npm start

答案3

得分: 0

你可以通过运行以下命令来验证包是否一切正常:

npm audit fix --force

英文:

you can verify if everything is OK in the packages running:

npm audit fix --force 

答案4

得分: 0

首先运行 "npm install"。

它会在您的系统上安装项目中使用的所有必需依赖项。

然后运行 "npm start"。

如果不起作用,请尝试 "npm run dev"。

还要确保使用项目的正确配置。

英文:

First run "npm install".

It installs all the required dependencies used by the project on your system.

Then run "npm start".

If it doesn't work, try "npm run dev".

Also make sure to use the right configurations for the project.

答案5

得分: 0

如果AGCloud项目编译失败,您应检查Node.js和npm版本,同时验证依赖项并升级或修复具有漏洞的依赖项,并安装稳定版本。

英文:

If the AGCloud project fails to compile you should check Node.js and npm versions alongside verifying dependencies and upgrade or fix dependencies with vulnerabilities and install the stable version.

答案6

得分: 0

首先,确保您拥有安装 AGE Viewer 所需的正确版本的 npm

最后,您必须位于 AGE Viewer 目录中才能运行与安装和启动 AGE Viewer 相关的命令,即您应该在 AGE Viewer 目录中运行 npm run start,而不是根目录。

请参阅文档以获取更清晰的信息。

英文:

Firstly, ensure you have the correct version of npm required for the installation of AGE Viewer.

Finally, you have to be in the AGE Viewer directory to run the commands associated with installation and starting up AGE Viewer i.e you should run npm run start in the AGE Viewer directory not the root directory.

Kindly revisit the docs for clarity.

答案7

得分: 0

请验证您是否安装了正确版本的npm。还要检查是否已安装所有依赖项。

您可以参考此指南:Age-viewer

英文:

Verify if you have the correct version of npm installed. Also check if all the dependencies have been installed.

You can refer to this guide: Age-viewer

答案8

得分: 0

以下是翻译好的部分:

"我能理解的是Node或NPM版本存在错误。首先,您可以使用以下命令检查您已安装的版本是否与项目兼容:

node -v
npm -v

这些命令将在终端中显示您在本地机器上安装的版本。

如果版本不兼容,您可以通过运行 npm install 卸载它们,然后重新安装。

最后,如果问题仍然存在,您可以尝试使用以下命令清除缓存:

npm cache clean --force,然后立即运行 npm install。这应该有所帮助。

如果这些步骤不起作用,请尝试查阅项目文档以解决特定问题。"

英文:

What I can understand is there is an error in Node or NPM versions. Firstly you can check that the versions you have installed are compatible with the project by using these commands:

    node -v 
    npm -v

These will display the versions that you have installed on your local machine in the terminal.

If the versions are incompatible you can uninstall them and reinstall by running npm install

Finally, if the issue persists you can try cleaning the cache by using

npm cache clean --force and use npm install right after. This should help.

If these steps don't help do try consulting the project documentation for your particular issue.

答案9

得分: 0

首先运行以下命令以清除缓存文件夹中的所有数据。

npm cache clean --force

然后运行以下命令以安装所有所需的依赖项。

npm install

还要确保您的 Node 版本是 14.6,以与 AGE-Viewer 兼容,因为这在文档中提到了。

英文:

First Run the following command to remove all the data present in the cache folder.

npm cache clean --force

Then run the following command to install all the required dependencies.

npm install

Also make sure that the node version that you have is 14.6 to be compatible with AGE-Viewer because this was mentioned in the documentation.

答案10

得分: 0

如果您已经尝试了上面的所有答案,但仍然无法正常工作,请尝试以下操作:

Linux

export NODE_OPTIONS=--openssl-legacy-provider

Windows

set NODE_OPTIONS=--openssl-legacy-provider

在重新运行项目之前,请在终端中运行此命令,并在重新运行之前进行一次全新的软件包安装。

英文:

If you have tried all the answers above and it still isn't working then try the following:

# linux
export NODE_OPTIONS=--openssl-legacy-provider
# windows
set NODE_OPTIONS=--openssl-legacy-provider

You need to run this in your terminal before running the project and also do a fresh install of the packages before rerunning it.

huangapple
  • 本文由 发表于 2023年6月29日 23:44:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/76582637.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定