saltyshiomix / nextron

⚡ Next.js + Electron ⚡
https://npm.im/nextron
MIT License
3.97k stars 229 forks source link

Build failed because of webpack errors #198

Closed TRUEJASONFANS closed 3 years ago

TRUEJASONFANS commented 3 years ago

node:16.4.0 using the template with-typescript-tailwindcss

Build error occurred
Error: > Build failed because of webpack errors
    at C:\Users\zhxie\Program files\Github\nuxt-electrion\node_modules\next\dist\build\index.js:15:924
    at async Span.traceAsyncFn (C:\Users\zhxie\Program files\Github\nuxt-electrion\node_modules\next\dist\telemetry\trace\trace.js:6:584)

after use 'yarn build'

filiptronicek commented 3 years ago

I have experienced this too, right after upgrading to v7 of Nextron (Next v11.x).

Here is the full log I got out of building the project:

⚠️ Don't expand if you're scared of long logs... ``` $ nextron build [nextron] Clearing previous builds [nextron] Building renderer process info - Using webpack 5. Reason: Enabled by default nextjs.org/docs/messages/webpack5 warn - No build cache found. Please configure build caching for faster rebuilds. Read more: nextjs.org/docs/messages/no-cache Attention: Next.js now collects completely anonymous telemetry regarding usage. This information is used to shape Next.js' roadmap and prioritize features. You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: nextjs.org/telemetry info - Checking validity of types... info - Creating an optimized production build... Failed to compile. ./styles/globals.css HookWebpackError: __dirname is not defined -- inner error -- ReferenceError: __dirname is not defined Generated code for /home/runner/work/desktop/desktop/node_modules/next/dist/compiled/css-loader/api.js 1 | module.exports=function(){"use strict";var n={762:function(n){n.exports=function(n){var t=[];t.toString=function toString(){return this.map(function(t){var r=cssWithMappingToString(t,n);if(t[2]){return"@media ".concat(t[2]," {").concat(r,"}")}return r}).join("")};t.i=function(n,r,o){if(typeof n==="string"){n=[[null,n,""]]}var e={};if(o){for(var a=0;a where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: currentColor; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\nhr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\nimg {\n border-style: solid;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1;\n color: #9ca3af;\n}\n\nbutton {\n cursor: pointer;\n}\n\ntable {\n border-collapse: collapse;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\npre,\ncode,\nkbd,\nsamp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * 1. Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n * \n * 2. Add `vertical-align: middle` to align replaced elements more\n * sensibly by default when overriding `display` by adding a\n * utility like `inline`.\n *\n * This can trigger a poorly considered linting error in some\n * tools but is included by design.\n * \n * jensimmons/cssremedy/issues/14#issuecomment-634934210\n */\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their intrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/**\n * Ensure the default browser behavior of the `hidden` attribute.\n */\n\n*, ::before, ::after{\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, var(--tw-border-opacity));\n}\n\n.container{\n width: 100%;\n}\n\n@media (min-width: 640px){\n .container{\n max-width: 640px;\n }\n}\n\n@media (min-width: 768px){\n .container{\n max-width: 768px;\n }\n}\n\n@media (min-width: 1024px){\n .container{\n max-width: 1024px;\n }\n}\n\n@media (min-width: 1280px){\n .container{\n max-width: 1280px;\n }\n}\n\n@media (min-width: 1536px){\n .container{\n max-width: 1536px;\n }\n}\n\n.visible{\n visibility: visible;\n}\n\n.fixed{\n position: fixed;\n}\n\n.absolute{\n position: absolute;\n}\n\n.top-2{\n top: 0.5rem;\n}\n\n.mt-6{\n margin-top: 1.5rem;\n}\n\n.mt-8{\n margin-top: 2rem;\n}\n\n.mt-12{\n margin-top: 3rem;\n}\n\n.mt-20{\n margin-top: 5rem;\n}\n\n.mt-40{\n margin-top: 10rem;\n}\n\n.mb-10{\n margin-bottom: 2.5rem;\n}\n\n.mb-12{\n margin-bottom: 3rem;\n}\n\n.flex{\n display: flex;\n}\n\n.table{\n display: table;\n}\n\n.h-6{\n height: 1.5rem;\n}\n\n.h-screen{\n height: 100vh;\n}\n\n.w-6{\n width: 1.5rem;\n}\n\n.w-64{\n width: 16rem;\n}\n\n.w-1\\/2{\n width: 50%;\n}\n\n.w-full{\n width: 100%;\n}\n\n.transform{\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n@-webkit-keyframes spin{\n to{\n transform: rotate(360deg);\n }\n}\n\n@keyframes spin{\n to{\n transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes ping{\n 75%, 100%{\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@keyframes ping{\n 75%, 100%{\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@-webkit-keyframes pulse{\n 50%{\n opacity: .5;\n }\n}\n\n@keyframes pulse{\n 50%{\n opacity: .5;\n }\n}\n\n@-webkit-keyframes bounce{\n 0%, 100%{\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50%{\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n@keyframes bounce{\n 0%, 100%{\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50%{\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n.cursor-pointer{\n cursor: pointer;\n}\n\n.list-none{\n list-style-type: none;\n}\n\n.flex-col{\n flex-direction: column;\n}\n\n.content-center{\n align-content: center;\n}\n\n.items-center{\n align-items: center;\n}\n\n.justify-between{\n justify-content: space-between;\n}\n\n.gap-5{\n gap: 1.25rem;\n}\n\n.break-all{\n word-break: break-all;\n}\n\n.rounded{\n border-radius: 0.25rem;\n}\n\n.rounded-xl{\n border-radius: 0.75rem;\n}\n\n.rounded-3xl{\n border-radius: 1.5rem;\n}\n\n.border{\n border-width: 1px;\n}\n\n.border-solid{\n border-style: solid;\n}\n\n.border-none{\n border-style: none;\n}\n\n.bg-white{\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, var(--tw-bg-opacity));\n}\n\n.p-4{\n padding: 1rem;\n}\n\n.px-4{\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n.px-5{\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n\n.py-4{\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n\n.text-center{\n text-align: center;\n}\n\n.text-xl{\n font-size: 1.25rem;\n line-height: 1.75rem;\n}\n\n.text-2xl{\n font-size: 1.5rem;\n line-height: 2rem;\n}\n\n.text-4xl{\n font-size: 2.25rem;\n line-height: 2.5rem;\n}\n\n.text-5xl{\n font-size: 3rem;\n line-height: 1;\n}\n\n.text-6xl{\n font-size: 3.75rem;\n line-height: 1;\n}\n\n.text-black{\n --tw-text-opacity: 1;\n color: rgba(0, 0, 0, var(--tw-text-opacity));\n}\n\n.text-white{\n --tw-text-opacity: 1;\n color: rgba(255, 255, 255, var(--tw-text-opacity));\n}\n\n@media (prefers-color-scheme: dark){\n .dark\\:text-white{\n --tw-text-opacity: 1;\n color: rgba(255, 255, 255, var(--tw-text-opacity));\n }\n}\n\n.underline{\n text-decoration: underline;\n}\n\n*, ::before, ::after{\n --tw-shadow: 0 0 #0000;\n}\n\n.focus\\:outline-none:focus{\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n*, ::before, ::after{\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(59, 130, 246, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n}\n\n.filter{\n --tw-blur: var(--tw-empty,/*!*/ /*!*/);\n --tw-brightness: var(--tw-empty,/*!*/ /*!*/);\n --tw-contrast: var(--tw-empty,/*!*/ /*!*/);\n --tw-grayscale: var(--tw-empty,/*!*/ /*!*/);\n --tw-hue-rotate: var(--tw-empty,/*!*/ /*!*/);\n --tw-invert: var(--tw-empty,/*!*/ /*!*/);\n --tw-saturate: var(--tw-empty,/*!*/ /*!*/);\n --tw-sepia: var(--tw-empty,/*!*/ /*!*/);\n --tw-drop-shadow: var(--tw-empty,/*!*/ /*!*/);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.transition{\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.ease-out{\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n\n::-moz-selection {\n color: black;\n background: white;\n}\n\n::selection {\n color: black;\n background: white;\n}\n\ninput::-moz-selection {\n color: white;\n background: #157efb;\n}\n\ninput::selection {\n color: white;\n background: #157efb;\n}\n\n* {\n font-family: \"Lato\", Helvetica, sans-serif;\n}\n\nbody {\n background: #157efb;\n}\n\n.urlbar {\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);\n font-weight: 400;\n padding: 0 10px;\n height: 3.2rem;\n border: 4px solid #fff;\n width: 35rem;\n max-width: 90vw;\n}\n\n.infor a {\n text-decoration: underline;\n}\n\n.receive-bar {\n font-size: 36px;\n}\n\n.receive-bar::-moz-placeholder {\n filter: grayscale(100%);\n}\n\n.receive-bar:-ms-input-placeholder {\n filter: grayscale(100%);\n}\n\n.receive-bar::placeholder {\n filter: grayscale(100%);\n}\n\n@media (prefers-color-scheme: dark) {\n body {\n background: #151515;\n }\n\n .menu-item {\n background: #262626;\n color: white;\n }\n}\n\n@media (min-width: 640px){\n}\n\n@media (min-width: 768px){\n}\n\n@media (min-width: 1024px){\n}\n\n@media (min-width: 1280px){\n}\n\n@media (min-width: 1536px){\n}\n", "",{"version":3,"sources":["webpack://styles/globals.css",""],"names":[],"mappings":"AAEA,gEAAc;;AAAd,8FAAc;;AAAd;;;CAAc;;AAAd;;CAAc;;AAAd;;;EAAA,sBAAc;AAAA;;AAAd;;CAAc;;AAAd;EAAA,gBAAc;EAAd,cAAc;KAAd,WAAc;AAAA;;AAAd;;;CAAc;;AAAd;EAAA,iBAAc,EAAd,MAAc;EAAd,8BAAc,EAAd,MAAc;AAAA;;AAAd;;;CAAc;;AAAd;;CAAc;;AAAd;EAAA,SAAc;AAAA;;AAAd;;CAAc;;AAAd;EAAA;;;;;;;;;kBAAc;AAAA;;AAAd;;;CAAc;;AAAd;;;CAAc;;AAAd;EAAA,SAAc,EAAd,MAAc;EAAd,cAAc,EAAd,MAAc;AAAA;;AAAd;;;CAAc;;AAAd;;CAAc;;AAAd;EAAA,yCAAc;UAAd,iCAAc;AAAA;;AAAd;;CAAc;;AAAd;;EAAA,mBAAc;AAAA;;AAAd;;;CAAc;;AAAd;;;;EAAA;;;;;;WAAc,EAAd,MAAc;EAAd,cAAc,EAAd,MAAc;AAAA;;AAAd;;CAAc;;AAAd;EAAA,cAAc;AAAA;;AAAd;;CAAc;;AAAd;;EAAA,cAAc;EAAd,cAAc;EAAd,kBAAc;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EACE,YAAY;EACZ,mBAAmB;AACrB;;AAEA;EACE,0CAA0C;AAC5C;;AAEA;EACE,mBAAmB;AACrB;;AAEA;EACE,0CAA0C;EAC1C,gBAAgB;EAChB,eAAe;EACf,cAAc;EACd,sBAAsB;EAEtB,YAAY;EACZ,eAAe;AACjB;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,uBAAuB;AACzB;;AAFA;EACE,uBAAuB;AACzB;;AAFA;EACE,uBAAuB;AACzB;;AAEA;EACE;IACE,mBAAmB;EACrB;;EACA;IACE,mBAAmB;IACnB,YAAY;EACd;AACF;;ACvDA;AD+7BA;;AC/7BA;ADk8BA;;ACl8BA;ADq8BA;;ACr8BA;ADw8BA;;ACx8BA;AD28BA","sourcesContent":["@import url(\"fonts.googleapis.com/css2?family=Lato&display=swap\");\n\n@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n::selection {\n color: black;\n background: white;\n}\n\ninput::selection {\n color: white;\n background: #157efb;\n}\n\n* {\n font-family: \"Lato\", Helvetica, sans-serif;\n}\n\nbody {\n background: #157efb;\n}\n\n.urlbar {\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);\n font-weight: 400;\n padding: 0 10px;\n height: 3.2rem;\n border: 4px solid #fff;\n\n width: 35rem;\n max-width: 90vw;\n}\n\n.infor a {\n text-decoration: underline;\n}\n\n.receive-bar {\n font-size: 36px;\n}\n\n.receive-bar::placeholder {\n filter: grayscale(100%);\n}\n\n@media (prefers-color-scheme: dark) {\n body {\n background: #151515;\n }\n .menu-item {\n background: #262626;\n color: white;\n }\n}\n",null],"sourceRoot":""}]); 10 | // Exports 11 | /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); 12 | > Build error occurred Error: > Build failed because of webpack errors at /home/runner/work/desktop/desktop/node_modules/next/dist/build/index.js:15:924 at async Span.traceAsyncFn (/home/runner/work/desktop/desktop/node_modules/next/dist/telemetry/trace/trace.js:6:584) error Command failed with exit code 1. Cannot build electron packages: Error: Command failed with exit code 1: next build /home/runner/work/desktop/desktop/renderer info Visit yarnpkg.com/en/docs/cli/run for documentation about this command. Error: Process completed with exit code 1. ```
filiptronicek commented 3 years ago

I would provide a repro demo, but the build process is broken even in the examples, so far I have tried both the Javascript and Typescript Tailwind demos, they both show up the same (apart from some TS build steps) errors.

filiptronicek commented 3 years ago

/cc @saltyshiomix sorry for the ping, but I'd love your comment on this.

TRUEJASONFANS commented 3 years ago

@filiptronicek I have this issue even in v7 of Nextron. The following is my package.json

{
  "private": true,
  "name": "my-nextron-app",
  "description": "My application description",
  "version": "1.0.0",
  "author": "Yoshihide Shiono <shiono.yoshihide@gmail.com>",
  "main": "app/background.js",
  "scripts": {
    "dev": "nextron",
    "build": "nextron build",
    "postinstall": "electron-builder install-app-deps"
  },
  "dependencies": {
    "electron-serve": "^1.1.0",
    "electron-store": "^8.0.0"
  },
  "devDependencies": {
    "@types/node": "^14.14.31",
    "@types/react": "^17.0.0",
    "autoprefixer": "^10.3.1",
    "electron": "^13.1.7",
    "electron-builder": "^22.11.7",
    "next": "^11.0.1",
    "nextron": "^7.0.0",
    "postcss": "^8.3.6",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "tailwindcss": "^2.2.7",
    "typescript": "^4.3.5"
  }
}
juicyjusung commented 3 years ago

@TRUEJASONFANS I don't know if this is the right solution.

next.config.js

module.exports = {
  webpack: (config, { isServer }) => {

    if (!isServer) {
      config.target = 'electron-renderer';
      config.node = {
        __dirname: true,
      }
    }
    return config;
  },
};
larskarbo commented 3 years ago

@TRUEJASONFANS I don't know if this is the right solution.

next.config.js

module.exports = {
  webpack: (config, { isServer }) => {

    if (!isServer) {
      config.target = 'electron-renderer';
      config.node = {
        __dirname: true,
      }
    }
    return config;
  },
};

This worked for me!

TRUEJASONFANS commented 3 years ago

sadly, @larskarbo @juicyjusung I still get same error after use @larskarbo 's change.

hardvain commented 3 years ago

@TRUEJASONFANS Make sure you add config.node = { __dirname: true, } to next.config.js inside the renderer folder and not the root folder.

saltyshiomix commented 3 years ago

I can reproduce this problem, and I think #199 is the solution.