brandonxiang / svelte-webpack-mpa

A template to create multi-page application powered by webpack
https://github.com/brandonxiang/svelte-webpack-template
MIT License
23 stars 3 forks source link

Windows 8.1, npm run dev, errors #5

Open ghost opened 4 years ago

ghost commented 4 years ago

I've got problem with running it up. When I hit "npm run dev", these errors appears:

windows 8.1 node v11.1.0 npm 6.4.1

D:\projects\svelteMPA>npm run build

> svelte-webpack-template@1.0.0 build D:\projects\svelteMPA
> cross-env NODE_ENV=production webpack

Webpack Bundle Analyzer saved report to D:\projects\svelteMPA\dist\report.html
Hash: d5c903e6a7c6dbfa1649
Version: webpack 4.42.0
Time: 3348ms
Built at: 2020-03-18 15:59:44
                                    Asset       Size  Chunks                         Chunk Names
                               page1.html   1.19 KiB          [emitted]
                               page2.html   1.19 KiB          [emitted]
public/css/page1.70594cc524324d01384a.css  190 bytes       0  [emitted] [immutable]  page1
public/css/page2.5283d7f5e464e25caa0e.css   68 bytes       1  [emitted] [immutable]  page2
  public/js/page1.008aef0b0b36f492dde6.js   10.3 KiB       0  [emitted] [immutable]  page1
  public/js/page2.ccaf3c7018e49b4c0016.js   14.7 KiB       1  [emitted] [immutable]  page2
                public/static/favicon.png   3.05 KiB          [emitted]
                 public/static/global.css  835 bytes          [emitted]
              public/static/logo-mask.svg   1.37 KiB          [emitted]
Entrypoint page1 = public/css/page1.70594cc524324d01384a.css public/js/page1.008aef0b0b36f492dde6.js
Entrypoint page2 = public/css/page2.5283d7f5e464e25caa0e.css public/js/page2.ccaf3c7018e49b4c0016.js
[20] ./src/pages/page1/App.svelte.css 39 bytes {0} [built]
[24] ./src/pages/page2/Map.svelte.css 39 bytes {1} [built]
[25] ./src/pages/page2/App.svelte.css 39 bytes {1} [built]
[26] ./src/pages/page2/main.js + 4 modules 13 KiB {1} [built]
     | ./src/pages/page2/main.js 117 bytes [built]
     | ./src/pages/page2/App.svelte 5.39 KiB [built]
     | ./src/pages/page2/Map.svelte 5.84 KiB [built]
     | ./src/pages/page2/MapMarker.svelte 1.63 KiB [built]
     | ./src/pages/page2/leaflet.js 29 bytes [built]
[27] ./src/pages/page1/main.js + 1 modules 2.88 KiB {0} [built]
     | ./src/pages/page1/main.js 151 bytes [built]
     | ./src/pages/page1/App.svelte 2.69 KiB [built]
    + 26 hidden modules

ERROR in   Error: D:\projects\svelteMPA\public\index.html:17257
  module.exports = g;
                 ^
  TypeError: Cannot assign to read only property 'exports' of object '#<Object>'

  - index.html:17257 Module.<anonymous>
    D:/projects/svelteMPA/public/index.html:17257:16

  - index.html:17258 Module.<anonymous>
    D:/projects/svelteMPA/public/index.html:17258:30

  - index.html:21 __webpack_require__
    D:/projects/svelteMPA/public/index.html:21:30

  - index.html:17229 Object.<anonymous>
    D:/projects/svelteMPA/public/index.html:17229:41

  - index.html:21 __webpack_require__
    D:/projects/svelteMPA/public/index.html:21:30

  - index.html:114 Object.<anonymous>
    D:/projects/svelteMPA/public/index.html:114:9

  - index.html:21 __webpack_require__
    D:/projects/svelteMPA/public/index.html:21:30

  - index.html:85
    D:/projects/svelteMPA/public/index.html:85:18

  - index.html:88
    D:/projects/svelteMPA/public/index.html:88:10

ERROR in   Error: D:\projects\svelteMPA\public\index.html:17257
  module.exports = g;
                 ^
  TypeError: Cannot assign to read only property 'exports' of object '#<Object>'

  - index.html:17257 Module.<anonymous>
    D:/projects/svelteMPA/public/index.html:17257:16

  - index.html:17258 Module.<anonymous>
    D:/projects/svelteMPA/public/index.html:17258:30

  - index.html:21 __webpack_require__
    D:/projects/svelteMPA/public/index.html:21:30

  - index.html:17229 Object.<anonymous>
    D:/projects/svelteMPA/public/index.html:17229:41

  - index.html:21 __webpack_require__
    D:/projects/svelteMPA/public/index.html:21:30

  - index.html:114 Object.<anonymous>
    D:/projects/svelteMPA/public/index.html:114:9

  - index.html:21 __webpack_require__
    D:/projects/svelteMPA/public/index.html:21:30

  - index.html:85
    D:/projects/svelteMPA/public/index.html:85:18

  - index.html:88
    D:/projects/svelteMPA/public/index.html:88:10

Child html-webpack-plugin for "page1.html":
     1 asset
    Entrypoint undefined = page1.html
    [1] ./node_modules/html-webpack-plugin/lib/loader.js!./public/index.html 516 bytes {0} [built]
    [3] (webpack)/buildin/global.js 578 bytes {0} [built]
    [4] (webpack)/buildin/harmony-module.js 631 bytes {0} [built]
    [5] (webpack)/buildin/module.js 552 bytes {0} [built]
        + 2 hidden modules
Child html-webpack-plugin for "page2.html":
     1 asset
    Entrypoint undefined = page2.html
    [1] ./node_modules/html-webpack-plugin/lib/loader.js!./public/index.html 516 bytes {0} [built]
    [3] (webpack)/buildin/global.js 578 bytes {0} [built]
    [4] (webpack)/buildin/harmony-module.js 631 bytes {0} [built]
    [5] (webpack)/buildin/module.js 552 bytes {0} [built]
        + 2 hidden modules
Child mini-css-extract-plugin ../svelteMPA\node_modules\css-loader\dist\cjs.js!../svelteMPA\src\pages\page1\App.svelte.css:
    Entrypoint mini-css-extract-plugin = *
    [0] ./node_modules/css-loader/dist/cjs.js!./src/pages/page1/App.svelte.css 334 bytes {0} [built]
        + 1 hidden module
Child mini-css-extract-plugin ../svelteMPA\node_modules\css-loader\dist\cjs.js!../svelteMPA\src\pages\page2\App.svelte.css:
    Entrypoint mini-css-extract-plugin = *
    [0] ./node_modules/css-loader/dist/cjs.js!./src/pages/page2/App.svelte.css 169 bytes {0} [built]
        + 1 hidden module
Child mini-css-extract-plugin ../svelteMPA\node_modules\css-loader\dist\cjs.js!../svelteMPA\src\pages\page2\Map.svelte.css:
    Entrypoint mini-css-extract-plugin = *
    [0] ./node_modules/css-loader/dist/cjs.js!./src/pages/page2/Map.svelte.css 187 bytes {0} [built]
        + 1 hidden module
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! svelte-webpack-template@1.0.0 build: `cross-env NODE_ENV=production webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the svelte-webpack-template@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Kamil\AppData\Roaming\npm-cache\_logs\2020-03-18T14_59_46_695Z-debug.log

D:\projects\svelteMPA>
coffeeslove commented 4 years ago

same problem

`ERROR in Error: E:\workspace\svelte\svelte-app\public\index.html:17257 module.exports = g; ^ TypeError: Cannot assign to read only property 'exports' of object '#'

  • index.html:17257 Module. E:/workspace/svelte/svelte-app/public/index.html:17257:16

  • index.html:17258 Module. E:/workspace/svelte/svelte-app/public/index.html:17258:30

  • index.html:21 __webpack_require__ E:/workspace/svelte/svelte-app/public/index.html:21:30

  • index.html:17229 Object. E:/workspace/svelte/svelte-app/public/index.html:17229:41

  • index.html:21 __webpack_require__ E:/workspace/svelte/svelte-app/public/index.html:21:30

  • index.html:114 Object. E:/workspace/svelte/svelte-app/public/index.html:114:9

  • index.html:21 __webpack_require__ E:/workspace/svelte/svelte-app/public/index.html:21:30

  • index.html:85 E:/workspace/svelte/svelte-app/public/index.html:85:18

  • index.html:88 E:/workspace/svelte/svelte-app/public/index.html:88:10

ERROR in Error: E:\workspace\svelte\svelte-app\public\index.html:17257 module.exports = g; ^ TypeError: Cannot assign to read only property 'exports' of object '#'

  • index.html:17257 Module. E:/workspace/svelte/svelte-app/public/index.html:17257:16

  • index.html:17258 Module. E:/workspace/svelte/svelte-app/public/index.html:17258:30

  • index.html:21 __webpack_require__ E:/workspace/svelte/svelte-app/public/index.html:21:30

  • index.html:17229 Object. E:/workspace/svelte/svelte-app/public/index.html:17229:41

  • index.html:21 __webpack_require__ E:/workspace/svelte/svelte-app/public/index.html:21:30

  • index.html:114 Object. E:/workspace/svelte/svelte-app/public/index.html:114:9

  • index.html:21 __webpack_require__ E:/workspace/svelte/svelte-app/public/index.html:21:30

  • index.html:85 E:/workspace/svelte/svelte-app/public/index.html:85:18

  • index.html:88 E:/workspace/svelte/svelte-app/public/index.html:88:10`