Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

windows rollup fail #237

Open
qwabra opened this issue Jul 8, 2020 · 5 comments
Open

windows rollup fail #237

qwabra opened this issue Jul 8, 2020 · 5 comments

Comments

@qwabra
Copy link

qwabra commented Jul 8, 2020

windows rollup fail

npm/yarn
nodejs 12/14
windows 10

rollup

npx degit "sveltejs/sapper-template#rollup" my-app

> Executing task: yarn run dev <

yarn run v1.22.4
warning package.json: No license field
$ sapper dev
• server
'@sapper/server' is imported by src\server.js, but could not be resolved – treating it as an external dependency
• client
'@sapper/app' is imported by src\client.js, but could not be resolved – treating it as an external dependency   
• service worker
'@sapper/service-worker' is imported by src\service-worker.js, but could not be resolved – treating it as an external dependency
'routes' is imported from external module '@sapper/service-worker' but never used
No name was provided for external module '@sapper/service-worker' in output.globals – guessing 'serviceWorker'
internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module '@sapper/server'
Require stack:
- W:\svelte\my-app\__sapper__\dev\server\server.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (W:\svelte\my-app\__sapper__\dev\server\server.js:8:14)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ 'W:\\svelte\\my-app\\__sapper__\\dev\\server\\server.js' ]
}
> Server crashed
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

webpack

npx degit "sveltejs/sapper-template#webpack" my-app

hmm, webpack, hotreload din't work !?

from browser console:

Uncaught TypeError: Cannot read property 'status' of undefined
    at check (sapper-dev-client.js:6)
    at EventSource.source.onmessage (sapper-dev-client.js:37)
@qwabra
Copy link
Author

qwabra commented Jul 8, 2020

windows docker

inside docker compile is ok, but ... watcher didn't work

# docker-compose.yml
version: '3'
services:
  dev:
    image: node:12-alpine
    volumes:
      # 
      - .:/workspace
      # 
      # - nodemodules:/workspace/node_modules
      - /workspace/node_modules
      - /workspace/__sapper__
      - /workspace/src/node_modules
      # 
      # - /workspace/dist
      # - /workspace/.cache
      # 
      # - /etc/letsencrypt:/etc/letsencrypt
      # - /var/lib/letsencrypt:/var/lib/letsencrypt
    environment:
      - NODE_ENV=development
      - PORT=80
    working_dir: /workspace/
    ports:
      - 80:80
      - 10000:10000
    tty: true
# volumes:
#   nodemodules:
#     external: true

@qwabra
Copy link
Author

qwabra commented Jul 9, 2020

wsl 2, rollup

watcher

vscode "open foler inside WSL"(WSL addon) - fail
copy folder to home dir(inside WSL), and open it use code . - look like ok

hotreload

http://127.0.0.1:3000/ - fail (look like vscode route)
http://192.168.88.233:3000/ - fail (look like vscode route)
http://localhost:3000/ - is ok

sveltejs/sapper#485

@antony
Copy link
Member

antony commented Jul 9, 2020

Hi @qwabra

I'm assuming you are trying to build the template on your windows machine. I'm a little confused at what part Docker plays in this?

@qwabra
Copy link
Author

qwabra commented Jul 9, 2020

I try different ways of working from under Windows in search of a working solution.

@qwabra
Copy link
Author

qwabra commented Jul 12, 2020

So, for Windows, single work solution for me - is WSL 1 (rollup is checked )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants