After updating my Angular / Foundation project to use node.js v9.3.0, I encountered an error during webpack build process. Everything was fine with v8.4.0.
ERROR in src/app/app.component.ts(9,29): error TS2306: File '/path/to/node_modules/foundation-sites/dist/js/foundation.d.ts' is not a module.
Even though the file foundation.d.ts
does exist, upgrading from foundation-sites v6.4.3 to v6.4.4-rc1 did not solve the issue.
This is how the import is configured in app.component.ts
:
import * as Foundation from 'foundation-sites';
Below are the dependencies listed in my package.json
:
"dependencies": {
// List of dependencies here ...
},
"devDependencies": {
// List of devDependencies here ...
}