2016-05-25 53 views
4

私はパッケージャを実行したときに、私は次のエラーを取得しています:エラー:パスを持つファイルを見つけることができません:prelude_dev.js

Error: Unable to find file with path: /Users/erem/thrivespace/react-mobile/node_modules/react-native/packager/react-packager/src/Resolver/polyfills/prelude_dev.js 
    at Fastfs.readFile (/Users/erem/thrivespace/react-mobile/node_modules/node-haste/lib/fastfs.js:141:15) 
    at /Users/erem/thrivespace/react-mobile/node_modules/node-haste/lib/Module.js:168:49 
    at Cache.get (/Users/erem/thrivespace/react-mobile/node_modules/node-haste/lib/Cache/index.js:64:103) 
    at Polyfill.read (/Users/erem/thrivespace/react-mobile/node_modules/node-haste/lib/Module.js:167:26) 
    at Bundler._toModuleTransport (index.js:524:14) 
    at toModuleTransport (index.js:400:14) 
    at Array.map (native) 
    at index.js:416:48 
    at tryCallOne (/Users/erem/thrivespace/react-mobile/node_modules/promise/lib/core.js:37:12) 
    at /Users/erem/thrivespace/react-mobile/node_modules/promise/lib/core.js:123:15 

私はすでに走ってきました:

rm -rf node_modules 
npm cache clean 
npm install 

私は」現在React Native 0.24.0を実行しています。

答えて

2

キャッシュの問題です。参照:https://github.com/facebook/react-native/issues/1924

あなたのパッケージャのキャッシュをクリアする必要があります。

rm -fr $TMPDIR/react-*

それともこれもトリックを行うために表示されます。

watchman watch-del-all

1

あなたがあなた自身のRNを使用している場合-cli.config.js無しで試してみてください。

悪いrn-cli.config.jsファイルでこれで何時間も無駄になりました。それはしないまでしばらく働いた。私の場合は


は、私はこれを使用していた。

var blacklist = require('react-native/packager/blacklist'); 
var config = { 
    getBlacklistRE(platform) { 
     return blacklist(platform, [ 
      /src/ 
     ]); 
    } 
}; 
module.exports = config; 

私はこの代わりに使用している必要がある場合:

var blacklist = require('react-native/packager/blacklist'); 
var config = require('react-native/packager/rn-cli.config'); 
config.getBlacklistRE = function(platform) { 
    return blacklist(platform, [ 
     /src/ 
    ]); 
}; 
module.exports = config; 
関連する問題