Reputation: 2160
I created an issue at the Aurelia CLI repo, but figured I would ask here just in case. I'm on Windows 7 with node 7.2.1 and npm 4.0.5. The linked issue has details about dependency versions.
When I try to build via au build
I get the error below. I have tried starting from scratch:
npm install npm -g
([email protected])npm install aurelia-cli -g
([email protected])npm install
au build
> au build
resolve failed: { Error: Cannot find module 'babel-runtime'
at Function.Module._resolveFilename (module.js:470:15)
at Function.requireRelative.resolve (C:\myworkingdir\node_modules\require-relative\index.js:30:17)
at resolve (C:\myworkingdir\node_modules\modify-babel-preset\lib\serialize.js:26:26)
at findAndRemove (C:\myworkingdir\node_modules\modify-babel-preset\lib\serialize.js:83:11)
at C:\myworkingdir\node_modules\modify-babel-preset\lib\serialize.js:126:13
at Array.map (native)
at loadPreset (C:\myworkingdir\node_modules\modify-babel-preset\lib\serialize.js:118:29)
at module.exports (C:\myworkingdir\node_modules\modify-babel-preset\index.js:95:19)
at Object.<anonymous> (C:\myworkingdir\node_modules\babel-preset-es2015-loose\index.js:5:18)
at Module._compile (module.js:571:32)
at Module._extensions..js (module.js:580:10)
at Object.require.extensions.(anonymous function) [as .js] (C:\myworkingdir\node_modules\babel-register\lib\node.js:152:7)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17) code: 'MODULE_NOT_FOUND' } babel-runtime
C:\myworkingdir\node_modules\babel-core\lib\transformation\file\options\option-manager.js:334
throw e;
^
TypeError: Cannot read property 'displayName' of undefined (While processing preset: "C:\\myworkingdir\\node_modules\\babel-preset-es2015-loose\\index.js")
I tried npm install babel-runtime
explicitly, but that does not work.
Upvotes: 0
Views: 348
Reputation: 2160
The culprit was when I updated to [email protected] (originally Aurelia CLI has it at ^7.0.0
). That project is now deprecated if using [email protected] or above.
Removing babel-preset-es2015-loose from package.json
and using the new preset
configuration from that link (in .babelrc
file) allows Aurelia to build again.
There's a pull request to fix this. Should be accepted soon.
Upvotes: 3