You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cat ./src/storage.js
export const sqrt = Math.sqrt;
export function square(x) {
return x * x;
}
export function diag(x, y) {
return sqrt(square(x) + square(y));
}
OK this is a pretty basic object. I'll try to import it:
~/projects/StarsApp @ Magni (jcollum)
$ nesh -b
Babel 5.8.38 on Node v7.8.0
Type .help for more information
babel> import './src/storage';
TypeError: Cannot read property 'error' of undefined
at OptionManager.mergeOptions (/Users/jcollum/.nvm/versions/node/v7.8.0/lib/node_modules/nesh/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:28)
at OptionManager.addConfig (/Users/jcollum/.nvm/versions/node/v7.8.0/lib/node_modules/nesh/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
at OptionManager.findConfigs (/Users/jcollum/.nvm/versions/node/v7.8.0/lib/node_modules/nesh/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
at OptionManager.init (/Users/jcollum/.nvm/versions/node/v7.8.0/lib/node_modules/nesh/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
at compile (/Users/jcollum/.nvm/versions/node/v7.8.0/lib/node_modules/nesh/node_modules/babel-core/lib/api/register/node.js:117:22)
at normalLoader (/Users/jcollum/.nvm/versions/node/v7.8.0/lib/node_modules/nesh/node_modules/babel-core/lib/api/register/node.js:199:14)
at Object.require.extensions.(anonymous function) [as .js] (/Users/jcollum/.nvm/versions/node/v7.8.0/lib/node_modules/nesh/node_modules/babel-core/lib/api/register/node.js:216:7)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
Key line:
TypeError: Cannot read property 'error' of undefined at OptionManager.mergeOptions (/Users/jcollum/.nvm/versions/node/v7.8.0/lib/node_modules/nesh/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:28)
I'm not sure what I'm doing wrong. The error isn't much help.
The text was updated successfully, but these errors were encountered:
The issue was that I had a .babelrc file in the directory (not entirely sure where it came from, I don't think react-native needs it). I renamed it and nesh -b started working.
OK this is a pretty basic object. I'll try to import it:
Key line:
TypeError: Cannot read property 'error' of undefined at OptionManager.mergeOptions (/Users/jcollum/.nvm/versions/node/v7.8.0/lib/node_modules/nesh/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:28)
I'm not sure what I'm doing wrong. The error isn't much help.
The text was updated successfully, but these errors were encountered: