dojo / cli-build-webpack

🚀 **DEPRECATED** Dojo 2 - cli command for building applications
http://dojo.io
Other
4 stars 19 forks source link

Now (after the update) I get two build errors #187

Closed sebilasse closed 7 years ago

sebilasse commented 7 years ago

@kitsonk While the update described in https://github.com/dojo/widget-core/issues/626 should work now, I get the following errors when $ dojo build -w

[... update :] seeAlso https://github.com/darul75/web-react/issues/12#issuecomment-234809701 ff. after adding

"webpack": "^3.4.1",
"webpack-dev-server": "^2.6.1",

to my project's package.json most errors are gone, just

ERROR in /Users/sebi/Desktop/redaktorTS2/src/webcomponents/semantic/node_modules/@dojo/shim/Promise.d.ts
(14,40): error TS2693: 'Promise' only refers to a type, but is being used as a value here.

ERROR in ./~/@dojo/core/text.js
Module not found: Error: Can't resolve 'fs' in '/Users/sebi/Desktop/redaktorTS2/src/webcomponents/semantic/node_modules/@dojo/core'
 @ ./~/@dojo/core/text.js 34:65-78
 @ ./~/@dojo/core/main.js
 @ ./src/lib/SUI.ts
 @ ./src/widgets/Container/Container.ts
 @ ./src/App.ts
 @ ./src/main.ts
 @ multi webpack-dev-server/client? ./src/main.css ./src/main.ts

will figure out ...

sebilasse commented 7 years ago

Regarding the 2nd error See fs / webpack https://github.com/webpack-contrib/css-loader/issues/447 I would recommend to add to webpack.config.js

node: {
  fs: 'empty'
}

Fixed it for me. This is resolved here now. But leaving it open because the above could happen if anybody is using TS > 2.4.2

agubler commented 7 years ago

To resolve the first error please add es2015.promise lib to your tsconfig.json, for example:

        "lib": [
            "dom",
            "es5",
            "es2015.iterable",
            "es2015.promise",
            "es2015.symbol",
            "es2015.symbol.wellknown"
        ],