rcjsuen / dockerfile-language-service

Dockerfile language service for providing an API to create feature-rich Dockerfile editors in JavaScript.
MIT License
16 stars 2 forks source link

Example builds but its output is bad #27

Closed rcjsuen closed 6 years ago

rcjsuen commented 6 years ago

After you build the example with npm run build, opening the example/lib/index/index.html will throw an error and just show you a blank screen.

main.js:3 Uncaught Error: Cannot find module "."
    at webpackMissingModule (main.js:3)
    at Object.defineProperty.value (main.js:3)
    at Object.defineProperty.value (main.js:9)
    at __webpack_require__ (bootstrap 4e4ce2c04d19f31a56c5:19)
    at Object.window.onload (client.js:7)
    at __webpack_require__ (bootstrap 4e4ce2c04d19f31a56c5:19)
    at main.js:10
    at Function.Module._invokeFactory (loader.js:924)
    at Module.complete (loader.js:934)
    at ModuleManager._onModuleComplete (loader.js:1533)

This happens with npm 5 because it's now using symlinks for local installs. Webpack seems to bundle up everything just fine but at runtime it won't be able to resolve the modules. We need to change how the example is built so that it's using an actual directory of content for example/node_modules/dockerfile-language-service instead of a directory symlink.