Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Parse Error" exits program, gives no context about which file failed #369

Closed
FredKSchott opened this issue May 28, 2020 · 1 comment · Fixed by #390
Closed

"Parse Error" exits program, gives no context about which file failed #369

FredKSchott opened this issue May 28, 2020 · 1 comment · Fixed by #390
Assignees
Labels
bug Something isn't working contributors welcome! contributors welcome! good first issue Good for newcomers

Comments

@FredKSchott
Copy link
Owner

Instead of exiting Snowpack, a Parse Error should just log the file that couldn't be parsed, and continue.

See #363 for an example of current behavior being bad.

@JakubKoralewski
Copy link

Hi @FredKSchott, I'm trying out Snowpack for first time. I still have this. Should I create separate issue or can this be reopened?

Versions
  "devDependencies": {
    "@snowpack/plugin-typescript": "^1.2.1",
    "snowpack": "^3.0.11",
    "snowpack-plugin-wasm-pack": "^1.0.0",
    "typescript": "^4.1.3"
  }
What I see
▼ @snowpack/plugin-typescript

  12:51:24 - File change detected. Starting incremental compilation...
snowpack

  http://localhost:8080 • http://10.13.18.10:8080
  Server started in 320ms.

▼ Console

[snowpack] Nothing to install.
[snowpack] Build Result Error: There was a problem with a file build result.
[snowpack] Error: Parse error @:4:40
[snowpack] [500] /
[snowpack] File changed... [x6]
With verbose
▼ Console

[snowpack] run command: dev
[snowpack] loaded plugin: D:\projects\github\pl_to_arpabet\testing\test1-snowpack\node_modules\snowpack-plugin-wasm-pack\plugin.js
[snowpack] loaded plugin: D:\projects\github\pl_to_arpabet\testing\test1-snowpack\node_modules\@snowpack\plugin-typescript\plugin.js
[snowpack] config loaded: {
  root: 'D:\\projects\\github\\pl_to_arpabet\\testing\\test1-snowpack',
  plugins: [
    {
      name: 'wasm-pack-snowpack-plugin [pl-to-arpabet]',
      run: [AsyncFunction: run],
      config: [Function: config],
      markChanged: [Function]
    },
    {
      name: '@snowpack/plugin-typescript',
      run: [AsyncFunction: run],
      markChanged: [Function]
    },
    {
      name: '@snowpack/plugin-esbuild',
      resolve: [Object],
      load: [AsyncFunction: load],
      cleanup: [Function: cleanup]
    }
  ],
  alias: {
    'pl-to-arpabet': 'D:\\projects\\github\\pl_to_arpabet\\pl-to-arpabet\\pkg'
  },
  exclude: [
    '**/node_modules/**/*',
    'D:\\projects\\github\\pl_to_arpabet\\testing\\test1-snowpack\\build/**/*',
    '..\\pl-to-arpabet\\target\\**\\*'
  ],
  routes: [],
  devOptions: {
    secure: false,
    hostname: 'localhost',
    port: 8080,
    open: 'default',
    output: 'dashboard',
    hmrDelay: 0,
    hmrPort: undefined,
    hmrErrorOverlay: true
  },
  buildOptions: {
    out: 'D:\\projects\\github\\pl_to_arpabet\\testing\\test1-snowpack\\build',
    baseUrl: '/',
    metaUrlPath: '/_snowpack',
    clean: true,
    sourcemap: false,
    watch: false,
    htmlFragments: false,
    ssr: false
  },
  testOptions: { files: [ '__tests__/**/*', '**/*.@(spec|test).*' ] },
  packageOptions: {
    source: 'local',
    external: [],
    packageLookupFields: [],
    knownEntrypoints: [],
    rollup: { plugins: [] }
  },
  experiments: {},
  mount: {
    'D:\\projects\\github\\pl_to_arpabet\\testing\\test1-snowpack': { url: '/', static: false, resolve: true },
    'D:\\projects\\github\\pl_to_arpabet\\pl-to-arpabet\\pkg': { url: '/dist/pl-to-arpabet', static: true, resolve: true }
  },
  optimize: undefined,
  _extensionMap: {
    '.mjs': [ '.js' ],
    '.jsx': [ '.js' ],
    '.ts': [ '.js' ],
    '.tsx': [ '.js' ]
  }
}
[snowpack] lockfile not loaded
[snowpack] attaching console.log listeners
[snowpack] dashboard started
[snowpack] Using in-memory cache.
[snowpack] Mounting directories:
[snowpack]  -> 'D:\projects\github\pl_to_arpabet\testing\test1-snowpack' as URL '/'
[snowpack]  -> 'D:\projects\github\pl_to_arpabet\pl-to-arpabet\pkg' as URL '/dist/pl-to-arpabet'
[snowpack] Using cache folder: node_modules\.cache\snowpack\development
[snowpack] Cache out of date or missing. Updating...
[snowpack] Scanning index.html for imports as HTML
[snowpack] Skip scanning package-lock.json for imports (unknown file extension .json)
[snowpack] Skip scanning package.json for imports (unknown file extension .json)
[snowpack] Scanning script.js for imports as JS
[snowpack] Scanning script.ts for imports as JS
[snowpack] Scanning snowpack.config.js for imports as JS
[snowpack] Skip scanning tsconfig.json for imports (unknown file extension .json)
[snowpack] Scanning ..\..\pl-to-arpabet\pkg\index_bg.wasm.d.ts for imports as JS
[snowpack] Scanning ..\..\pl-to-arpabet\pkg\index.d.ts for imports as JS
[snowpack] Scanning ..\..\pl-to-arpabet\pkg\index.js for imports as JS
[snowpack] Skip scanning ..\..\pl-to-arpabet\pkg\package.json for imports (unknown file extension .json)
[snowpack] Scanning ..\..\pl-to-arpabet\pkg\pl_to_arpabet_bg.js for imports as JS
[snowpack] Scanning ..\..\pl-to-arpabet\pkg\pl_to_arpabet_bg.wasm.d.ts for imports as JS
[snowpack] Scanning ..\..\pl-to-arpabet\pkg\pl_to_arpabet.d.ts for imports as JS
[snowpack] Scanning ..\..\pl-to-arpabet\pkg\pl_to_arpabet.js for imports as JS
[snowpack] Skip scanning ..\..\pl-to-arpabet\pkg\README.md for imports (unknown file extension .md)
[snowpack] Nothing to install.
[snowpack] starting wasm-pack-snowpack-plugin [pl-to-arpabet] run() in watch/isDev mode
[snowpack] starting @snowpack/plugin-typescript run() in watch/isDev mode
[snowpack] Build Result Error: There was a problem with a file build result.
[snowpack] Error: Parse error @:4:40
[snowpack] [500] /
[snowpack] [500] GET /
[snowpack] File changed... [x7]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working contributors welcome! contributors welcome! good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants