[Error: Can't find npm module 'react/package.json'. Did you forget to call 'Npm.depends' in package.

Posted

技术标签:

【中文标题】[Error: Can\'t find npm module \'react/package.json\'. Did you forget to call \'Npm.depends\' in package.js within the \'modules-runtime\' package?]【英文标题】:[Error: Can't find npm module 'react/package.json'. Did you forget to call 'Npm.depends' in package.js within the 'modules-runtime' package?][Error: Can't find npm module 'react/package.json'. Did you forget to call 'Npm.depends' in package.js within the 'modules-runtime' package?] 【发布时间】:2016-09-15 02:02:04 【问题描述】:

我需要了解我必须做什么才能解决这个问题

“[错误:找不到 npm 模块 'react/package.json'。您是否忘记在 'modules-runtime' 包中的 package.js 中调用 'Npm.depends'?]” 我一直有我尝试用 react 在流星中开发应用程序。

我真的不知道是什么触发了错误。

感谢您期待的帮助。

【问题讨论】:

我想你你错过了一个包。请尝试运行meteor npm install --save react react-dom react-addons-transition-group react-addons-css-transition-group react-addons-linked-state-mixin react-addons-create-fragment react-addons-update react-addons-pure-render-mixin react-addons-test-utils react-addons-perf 【参考方案1】:

您需要安装 react 和 react-addons-pure-render-mixin。

npm install --save react react-addons-pure-render-mixin

当我尝试启动我的应用程序时,我在 react-meteor-data 包中遇到了同样的问题。

https://atmospherejs.com/meteor/react-meteor-data

【讨论】:

以上是关于[Error: Can't find npm module 'react/package.json'. Did you forget to call 'Npm.depends' in package.的主要内容,如果未能解决你的问题,请参考以下文章

Workbox with Angular 12 Error: Can't find self.__WB_MANIFEST in your SW source

webpack报错:Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find mo

Can't find mysqld.sock: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.s

npm run dev报错--Error: Cannot find module 'yargs-parser'

关于npm安装全局模块,require时报Error: Cannot find module 'XXX'的解决办法

ReactNative进阶(三十四):npm Error: Cannot find module ‘are-we-there-yet‘解决措施