React-app-rewired: Handstable Pro - React Wrapper

Created on 13 Sep 2017  路  1Comment  路  Source: timarney/react-app-rewired

I am using these instructions to configure webpack for Handsontable Pro to work with my CRA. I came across your package, attempted to implement it like this:

module.exports = function override(config, env) {
  //do stuff with the webpack config...
  resolve: {
    alias: {
      handsontable: path.resolve(__dirname, 'node_modules/handsontable-pro')
    }
  }
  return config;
}

Here is the error I get:

````
/Users/avremel/Desktop/grid-sample/config-overrides.js:5
handsontable: path.resolve(__dirname, 'node_modules/handsontable-pro')
^

ReferenceError: path is not defined
at override (/Users/avremel/Desktop/grid-sample/config-overrides.js:5:21)
at Object. (/Users/avremel/Desktop/grid-sample/node_modules/react-app-rewired/scripts/start.js:19:3)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:504:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: react-app-rewired start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/avremel/.npm/_logs/2017-09-13T15_46_43_280Z-debug.log
````

Help would be appreciated.

Most helpful comment

const path = require('path') at the top

>All comments

const path = require('path') at the top

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xiaoxiangmoe picture xiaoxiangmoe  路  3Comments

001123 picture 001123  路  4Comments

brendonco picture brendonco  路  3Comments

bilthon picture bilthon  路  5Comments

Tobbe picture Tobbe  路  5Comments