首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >创建react-360项目时出错

创建react-360项目时出错
EN

Stack Overflow用户
提问于 2021-03-17 18:56:22
回答 1查看 182关注 0票数 0

当我使用react-360 init启动一个新的react-360项目时,我得到了这个错误,myProject.It创建了这个文件夹,但是当我启动npm时,它给了我更多的错误。

代码语言:javascript
复制
react-360 init MyProject
(node:17583) ExperimentalWarning: The fs.promises API is experimental
Creating new React 360 project...
Project directory created at MyProject

Copying assets...

Installing dependencies...
(node:17584) ExperimentalWarning: The fs.promises API is experimental
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: MyProject@0.0.1
npm ERR! Found: react@16.3.2
npm ERR! node_modules/react
npm ERR!   react@"16.3.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"16.3.1" from react-native@0.55.4
npm ERR! node_modules/react-native
npm ERR!   react-native@"~0.55.4" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/scylla/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/scylla/.npm/_logs/2021-03-17T10_50_46_670Z-debug.log
`npm` exited with code 1. Try fixing the errors above and run `npm` from within MyProject again.

当我运行npm start时

代码语言:javascript
复制
npm start
(node:17675) ExperimentalWarning: The fs.promises API is experimental

> MyProject@0.0.1 start
> node node_modules/react-360/scripts/packager.js

internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '/Users/scylla/Documents/cs/react360test/MyProject/node_modules/react-360/scripts/packager.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

你有什么办法解决这个问题吗?谢谢。

EN

回答 1

Stack Overflow用户

发布于 2021-03-17 18:59:46

好了,我刚刚运行了npm install --force,它解决了所有问题!!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66671655

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档