dojo / cli-build-webpack

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

Problems building the app with webpack directly #245

Closed umaar closed 6 years ago

umaar commented 6 years ago

Bug

Package Version:

Before dojo eject

The currently installed groups are:

build (@dojo/cli-build-webpack) 0.2.1
create (@dojo/cli-create-app) 0.2.0
test (@dojo/cli-test-intern) 0.2.0

You are currently running @dojo/cli 0.2.0

After dojo eject

create (@dojo/cli-create-app) 0.2.0

You are currently running @dojo/cli 0.2.0

Code

If I dojo create --name eject-test and then dojo eject I get an instruction that I can do:

./node_modules/.bin/webpack --config ./config/build-webpack/webpack.config.js

However I get errors:

ERROR in /dojo-2-app/node_modules/@dojo/test-extras/harness.d.ts
(3,10): error TS2305: Module '"/dojo-2-app/node_modules/@dojo/widget-core/interfaces"' has no exported member 'ClassesFunction'.

ERROR in ./src/main.css
Module build failed: ModuleBuildError: Module build failed: Error: No PostCSS Config found in: /dojo-2-app/config/build-webpack/postcss.config.js
    at /dojo-2-app/node_modules/postcss-load-config/index.js:51:26
    at <anonymous>
    at runLoaders (/dojo-2-app/node_modules/webpack/lib/NormalModule.js:192:19)
    at /dojo-2-app/node_modules/loader-runner/lib/LoaderRunner.js:364:11
    at /dojo-2-app/node_modules/loader-runner/lib/LoaderRunner.js:230:18
    at context.callback (/dojo-2-app/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at Promise.resolve.then.then.catch (/dojo-2-app/node_modules/postcss-loader/lib/index.js:176:71)
    at <anonymous>
 @ multi @dojo/shim/main @dojo/shim/browser ./src/main.css ./src/main.ts

ERROR in ./src/widgets/styles/HelloWorld.m.css
Module build failed: ModuleBuildError: Module build failed: Error: No PostCSS Config found in: /dojo-2-app/config/build-webpack/postcss.config.js
    at /dojo-2-app/node_modules/postcss-load-config/index.js:51:26
    at <anonymous>
    at runLoaders (/dojo-2-app/node_modules/webpack/lib/NormalModule.js:192:19)
    at /dojo-2-app/node_modules/loader-runner/lib/LoaderRunner.js:364:11
    at /dojo-2-app/node_modules/loader-runner/lib/LoaderRunner.js:230:18
    at context.callback (/dojo-2-app/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at Promise.resolve.then.then.catch (/dojo-2-app/node_modules/postcss-loader/lib/index.js:176:71)
    at <anonymous>
 @ ./src/widgets/HelloWorld.ts 7:10-46
 @ ./src/main.ts
 @ multi @dojo/shim/main @dojo/shim/browser ./src/main.css ./src/main.ts

ERROR in ./src/main.css
Module build failed: ModuleBuildError: Module build failed: Error: No PostCSS Config found in: /dojo-2-app/config/build-webpack/postcss.config.js
    at /dojo-2-app/node_modules/postcss-load-config/index.js:51:26
    at <anonymous>
    at runLoaders (/dojo-2-app/node_modules/webpack/lib/NormalModule.js:192:19)
    at /dojo-2-app/node_modules/loader-runner/lib/LoaderRunner.js:364:11
    at /dojo-2-app/node_modules/loader-runner/lib/LoaderRunner.js:230:18
    at context.callback (/dojo-2-app/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at Promise.resolve.then.then.catch (/dojo-2-app/node_modules/postcss-loader/lib/index.js:176:71)
    at <anonymous>

ERROR in ./src/widgets/styles/HelloWorld.m.css
Module build failed: ModuleBuildError: Module build failed: Error: No PostCSS Config found in: /dojo-2-app/config/build-webpack/postcss.config.js
    at /dojo-2-app/node_modules/postcss-load-config/index.js:51:26
    at <anonymous>
    at runLoaders (/dojo-2-app/node_modules/webpack/lib/NormalModule.js:192:19)
    at /dojo-2-app/node_modules/loader-runner/lib/LoaderRunner.js:364:11
    at /dojo-2-app/node_modules/loader-runner/lib/LoaderRunner.js:230:18
    at context.callback (/dojo-2-app/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at Promise.resolve.then.then.catch (/dojo-2-app/node_modules/postcss-loader/lib/index.js:176:71)
    at <anonymous>
Child html-webpack-plugin for "index.html":
       [0] ./~/html-webpack-plugin/lib/loader.js!./src/index.html 247 bytes {0} [built]
Child extract-text-webpack-plugin:
       [0] ./~/@dojo/webpack-contrib/css-module-decorator-loader!./~/css-loader?modules&sourceMap&importLoaders=1&localIdentName=[hash:base64:8]!./~/postcss-loader/lib?{"config":{"path":"/dojo-2-app/config/build-webpack/postcss.config.js"}}!./src/main.css 340 bytes {0} [built] [failed] [1 error]

    ERROR in ./~/@dojo/webpack-contrib/css-module-decorator-loader!./~/css-loader?modules&sourceMap&importLoaders=1&localIdentName=[hash:base64:8]!./~/postcss-loader/lib?{"config":{"path":"/dojo-2-app/config/build-webpack/postcss.config.js"}}!./src/main.css
    Module build failed: Error: No PostCSS Config found in: /dojo-2-app/config/build-webpack/postcss.config.js
        at /dojo-2-app/node_modules/postcss-load-config/index.js:51:26
        at <anonymous>
Child extract-text-webpack-plugin:
       [0] ./~/@dojo/webpack-contrib/css-module-decorator-loader!./~/css-loader?modules&sourceMap&importLoaders=1&localIdentName=[hash:base64:8]!./~/postcss-loader/lib?{"config":{"path":"/dojo-2-app/config/build-webpack/postcss.config.js"}}!./~/@dojo/webpack-contrib/css-module-dts-loader?type=css!./src/widgets/styles/HelloWorld.m.css 340 bytes {0} [built] [failed] [1 error]

    ERROR in ./~/@dojo/webpack-contrib/css-module-decorator-loader!./~/css-loader?modules&sourceMap&importLoaders=1&localIdentName=[hash:base64:8]!./~/postcss-loader/lib?{"config":{"path":"/dojo-2-app/config/build-webpack/postcss.config.js"}}!./~/@dojo/webpack-contrib/css-module-dts-loader?type=css!./src/widgets/styles/HelloWorld.m.css
    Module build failed: Error: No PostCSS Config found in: /dojo-2-app/config/build-webpack/postcss.config.js
        at /dojo-2-app/node_modules/postcss-load-config/index.js:51:26
        at <anonymous>
Child extract-text-webpack-plugin:
       [0] ./~/@dojo/webpack-contrib/css-module-decorator-loader!./~/css-loader?modules&sourceMap&importLoaders=1&localIdentName=[hash:base64:8]!./~/postcss-loader/lib?{"config":{"path":"/dojo-2-app/config/build-webpack/postcss.config.js"}}!./src/main.css 340 bytes {0} [built] [failed] [1 error]

    ERROR in ./~/@dojo/webpack-contrib/css-module-decorator-loader!./~/css-loader?modules&sourceMap&importLoaders=1&localIdentName=[hash:base64:8]!./~/postcss-loader/lib?{"config":{"path":"/dojo-2-app/config/build-webpack/postcss.config.js"}}!./src/main.css
    Module build failed: Error: No PostCSS Config found in: /dojo-2-app/config/build-webpack/postcss.config.js
        at /dojo-2-app/node_modules/postcss-load-config/index.js:51:26
        at <anonymous>
Child extract-text-webpack-plugin:
       [0] ./~/@dojo/webpack-contrib/css-module-decorator-loader!./~/css-loader?modules&sourceMap&importLoaders=1&localIdentName=[hash:base64:8]!./~/postcss-loader/lib?{"config":{"path":"/dojo-2-app/config/build-webpack/postcss.config.js"}}!./~/@dojo/webpack-contrib/css-module-dts-loader?type=css!./src/widgets/styles/HelloWorld.m.css 340 bytes {0} [built] [failed] [1 error]

    ERROR in ./~/@dojo/webpack-contrib/css-module-decorator-loader!./~/css-loader?modules&sourceMap&importLoaders=1&localIdentName=[hash:base64:8]!./~/postcss-loader/lib?{"config":{"path":"/dojo-2-app/config/build-webpack/postcss.config.js"}}!./~/@dojo/webpack-contrib/css-module-dts-loader?type=css!./src/widgets/styles/HelloWorld.m.css
    Module build failed: Error: No PostCSS Config found in: /dojo-2-app/config/build-webpack/postcss.config.js
        at /dojo-2-app/node_modules/postcss-load-config/index.js:51:26
        at <anonymous>

The contents of config/build-webpack/ are just webpack.config.js

kitsonk commented 6 years ago

Since we are rewriting this, we might not address this particular issue in advance of the release. Keeping it open to help ensure that the rewrite does not prevent issues when ejecting.

agubler commented 6 years ago

Eject seems to be working as expected in the new cli-build-app command