gulp-sourcemaps:找不到模块'./src/init'



我得到一个错误,而安装React-native,我试图寻找一个答案,但我找不到一个。

当运行"react-native init meet"时,我得到这个错误:

    This will walk you through creating a new React Native project in /Users/alfred/React/meet
Installing react-native package from npm...
Setting up new React Native app in /Users/alfred/React/meet
module.js:338
    throw err;
    ^
Error: Cannot find module './src/init'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/alfred/React/meet/node_modules/react-native/node_modules/yeoman-generator/node_modules/download/node_modules/vinyl-fs/node_modules/gulp-sourcemaps/index.js:4:9)
    at Module._compile (module.js:434:26)
    at Module._extensions..js (module.js:452:10)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/alfred/React/meet/node_modules/react-native/node_modules/babel-register/lib/node.js:152:7)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

这与gulp-sourcemaps最近部署的一个问题有关https://github.com/floridoo/gulp-sourcemaps/issues/238

一个项目维护者在线程的最后说他今天会去做

暂时将您的版本锁定到2.0。X或1.7.x

要修复,请在package.json中添加特定版本,直到问题解决:

{
  "devDependencies": {
    "gulp-sourcemaps": "1.7.x"
  }
}
使用npm shrinkwrap来防止以后出现类似的问题。

这是由gulp-sourcemaps最近的变化引起的。查看bug: https://github.com/floridoo/gulp-sourcemaps/issues/238

现在已修复。运行npm installhttps://github.com/floridoo/gulp-sourcemaps/issues/238

相关内容

  • 没有找到相关文章

最新更新