Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack build fails on contentful #164

Closed
alewaros opened this issue Jun 20, 2017 · 2 comments · Fixed by #165
Closed

Webpack build fails on contentful #164

alewaros opened this issue Jun 20, 2017 · 2 comments · Fixed by #165

Comments

@alewaros
Copy link

  • Node Version: 8.1.2
  • Npm Version: 5.0.3
  • Platform: macOS 10.12.5
  • Package Version: 4.4.3

I'm importing contentful module on my webpack compiled project and when built, it produces these messages.

WARNING in ./node_modules/es6-promise/dist/es6-promise.js
Module not found: Error: Can't resolve 'vertx' in '/Users/aj/Developer/Selina/Selina-Booking-API/node_modules/es6-promise/dist'
 @ ./node_modules/es6-promise/dist/es6-promise.js 137:16-26
 @ ./node_modules/contentful-sdk-core/dist/es-modules/promised-wait.js
 @ ./node_modules/contentful-sdk-core/index.es-modules.js
 @ ./node_modules/contentful/dist/es6-modules/contentful.js
 @ ./src/index.js

ERROR in ./node_modules/contentful/dist/es6-modules/contentful.js
Module not found: Error: Can't resolve '../version.js' in '/Users/aj/Developer/Selina/Selina-Booking-API/node_modules/contentful/dist/es6-modules'
 @ ./node_modules/contentful/dist/es6-modules/contentful.js 13:0-36
 @ ./src/index.js

My webpack config file is this

var path = require('path')

module.exports = {
  entry: './src/index.js',
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname, 'dist')
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        use: ['babel-loader']
      }
    ]
  },
  target: 'node'
}
@alewaros alewaros changed the title Contentful crashes when built on webpack Webpack build fails on contentful Jun 20, 2017
@Khaledgarbaya
Copy link
Contributor

Hi @alewaros,
I just pushed a PR to fix the issue #165
can you check out that branch and test with it before I merge to master?

@alewaros
Copy link
Author

Sure thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants