thebells1111 / monaco-svelte-repl

This is an implementation of the Svelte REPL, but uses the Monaco Editor instead of CodeMirror. Monaco is the browser version of VSCode, so most of you should be familiar with it.
Other
9 stars 0 forks source link

Can't use npm build because module not found #1

Open R0bertDenir0 opened 3 years ago

R0bertDenir0 commented 3 years ago

System info:

Solus x86_64 node version : 14.17.1 npm : 6.14.13

The bug

with the following commands: npm install npm run build npm run dev

> svelte-app@1.0.0 build /home/luksss/code/monaco-svelte-repl
> cross-env NODE_ENV=production webpack

Hash: 9848020e816507ca8c61
Version: webpack 4.46.0
Time: 3326ms
Built at: 07/06/2021 11:51:55 AM
 5 assets
Entrypoint bundle =
[0] multi ./src/main.js 28 bytes {0} [built]
[1] ./src/main.js + 3 modules 63.6 KiB {0} [built]
    | ./src/main.js 104 bytes [built]
    | ./src/App.svelte 1.95 KiB [built]
    |     + 2 hidden modules

ERROR in ./src/App.svelte
Module not found: Error: Can't resolve './components/Repl/Repl.svelte' in '/home/luksss/code/monaco-svelte-repl/src'
 @ ./src/App.svelte 14:0-49 21:14-18
 @ ./src/main.js
 @ multi ./src/main.js

ERROR in chunk bundle [entry]
bundle.js
/home/luksss/code/monaco-svelte-repl/src/main.js 40c1143b2cdca6b8339dc06f0b6be6aa
Unexpected token (12:14)
|       let current;
|       let repl_1_props = { workersUrl: "workers" };
|       repl_1 = new !(function webpackMissingModule() { var e = new Error("Cannot find module './components/Repl/Repl.svelte'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())({ props: repl_1_props });
|       /*repl_1_binding*/ ctx[1](repl_1);
| 
Child vs/editor/editor:
     1 asset
    Entrypoint main = editor.worker.js
    [1] (webpack)/buildin/global.js 472 bytes {0} [built]
    [6] ./node_modules/monaco-editor/esm/vs/editor/editor.worker.js + 31 modules 357 KiB {0} [built]
        |    32 modules
        + 5 hidden modules
Child vs/language/css/cssWorker:
     1 asset
    Entrypoint main = css.worker.js
    [1] (webpack)/buildin/global.js 472 bytes {0} [built]
    [7] ./node_modules/monaco-editor/esm/vs/language/css/css.worker.js + 72 modules 1.64 MiB {0} [built]
        |    73 modules
        + 6 hidden modules
Child vs/language/html/htmlWorker:
     1 asset
    Entrypoint main = html.worker.js
    [1] (webpack)/buildin/global.js 472 bytes {0} [built]
    [7] ./node_modules/monaco-editor/esm/vs/language/html/html.worker.js + 63 modules 1.08 MiB {0} [built]
        |    64 modules
        + 6 hidden modules
Child vs/language/json/jsonWorker:
     1 asset
    Entrypoint main = json.worker.js
    [1] (webpack)/buildin/global.js 472 bytes {0} [built]
    [7] ./node_modules/monaco-editor/esm/vs/language/json/json.worker.js + 56 modules 669 KiB {0} [built]
        |    57 modules
        + 6 hidden modules
Child vs/language/typescript/tsWorker:
     1 asset
    Entrypoint main = ts.worker.js
    [2] (webpack)/buildin/global.js 472 bytes {0} [built]
    [7] (webpack)/buildin/harmony-module.js 573 bytes {0} [built]
    [8] ./node_modules/monaco-editor/esm/vs/language/typescript/ts.worker.js + 34 modules 1.47 MiB {0} [built]
        |    35 modules
        + 6 hidden modules
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! svelte-app@1.0.0 build: `cross-env NODE_ENV=production webpack`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the svelte-app@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!     /home/luksss/.npm/_logs/2021-07-06T09_51_56_274Z-debug.log
Y0lan commented 3 years ago

Same problem for me.

Missing the component REPL.svelte.... but it is there.

Please update instruction on how to run it if possible :)

leonistor commented 3 years ago

I belive @thebells1111 developed on a case-insensitive filesystem.

On my linux I "renamed" the culprits and it works:

mv src/Components src/components
mv src/components/REPL src/components/Repl