2

When I try to import solc, it raises an error which says:

ERROR in ./~/require-from-string/index.js
Module not found: Error: Can't resolve 'module' in 'C:\users\bisrat\Desktop\webpacksample\node_modules\require-from-stri
ng'
 @ ./~/require-from-string/index.js 3:13-30
 @ ./~/solc/wrapper.js
 @ ./~/solc/index.js
 @ ./app/javascripts/app.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./app/javascripts/app.js
1
  • Share the steps you followed to install truffle. Commented Jan 28, 2018 at 7:31

1 Answer 1

0

This is a webpack issue. Try adding target: 'node', to your webpack.config.js

 module.exports = {
  entry: './app/javascripts/app.js',
  target: 'node',
  output: {
    path: path.resolve(__dirname, 'build'),
    filename: 'app.js'
  }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.