ember-cli icon indicating copy to clipboard operation
ember-cli copied to clipboard

syntax error in server/* doesn't recover

Open stefanpenner opened this issue 10 years ago • 11 comments

stefanpenner avatar Dec 19 '14 22:12 stefanpenner

@stefanpenner what do you mean by server/*?

Turbo87 avatar Apr 13 '16 13:04 Turbo87

a syntax error in any file contained under server/*

stefanpenner avatar Apr 14 '16 01:04 stefanpenner

is it still valid?

auvipy avatar Dec 24 '19 11:12 auvipy

Ya, probably. Might be worth testing though.

rwjblue avatar Jan 03 '20 17:01 rwjblue

Have more information on how to reproduce it?

If this still is a problem.

kenliten avatar Oct 22 '20 04:10 kenliten

According to the CLI guides you should be able reproduce this problem by doing ember generate server <name>, and then introducing a syntax error to one of the generated files.

locks avatar Jan 20 '22 15:01 locks

Reproduced!

Followed those steps to reproduce the issue: First, my ember --version output:

ember-cli: 4.1.0
node: 16.13.1
os: linux x64
  • Created an empty project with ember new ember-test-project --lang en.
  • Generated a server with ember generate server testing in the project's root directory.
  • Ran the project with npm start
  • Introduced a syntax error (changed const globSync = require('glob').sync; to const globSync = reqire('glob').sync; in /server/index.js)
  • Terminal output:
File changed: "index.js"
⠙ building... [Babel: @ember-data/model > applyPatches]reqire is not defined
Server is not running.


Stack Trace and Error Report: /tmp/error.dump.7dc675ef125c81b34b0b88f9e7aca703.log
  • Fixed the typo, and back to the terminal, the output is exactly the same, no changes.

cat /tmp/error.dump.7dc675ef125c81b34b0b88f9e7aca703.log ouput:

=================================================================================

ENV Summary:

  TIME: Fri Jan 21 2022 11:46:46 GMT-0400 (Atlantic Standard Time)
  TITLE: ember
  ARGV:
  - /home/kenliten/.nvm/versions/node/v16.13.1/bin/node
  - /home/kenliten/Projects/ember-test-project/node_modules/.bin/ember
  - serve
  EXEC_PATH: /home/kenliten/.nvm/versions/node/v16.13.1/bin/node
  TMPDIR: /tmp
  SHELL: /usr/bin/zsh
  PATH:
  - /home/kenliten/Projects/ember-test-project/node_modules/.bin
  - /home/kenliten/Projects/node_modules/.bin
  - /home/kenliten/node_modules/.bin
  - /home/node_modules/.bin
  - /node_modules/.bin
  - /home/kenliten/.nvm/versions/node/v16.13.1/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin
  - /home/kenliten/.rvm/gems/ruby-3.0.0/bin
  - /home/kenliten/.rvm/gems/ruby-3.0.0@global/bin
  - /home/kenliten/.rvm/rubies/ruby-3.0.0/bin
  - /home/kenliten/.nvm/versions/node/v16.13.1/bin
  - /home/kenliten/.local/bin
  - /home/kenliten/.local/bin
  - /usr/local/bin
  - /usr/bin
  - /bin
  - /usr/local/sbin
  - /var/lib/flatpak/exports/bin
  - /usr/lib/jvm/default/bin
  - /usr/bin/site_perl
  - /usr/bin/vendor_perl
  - /usr/bin/core_perl
  - /var/lib/snapd/snap/bin
  - /home/kenliten/.rvm/bin
  - /usr/lib/jvm/default/bin
  - /home/kenliten/.rvm/bin
  PLATFORM: linux x64
  FREEMEM: 123170816
  TOTALMEM: 4000043008
  UPTIME: 2140.71
  LOADAVG: 4.88,5.44,4.73
  CPUS:
  - Intel(R) Pentium(R) CPU  N3540  @ 2.16GHz - 2661
  - Intel(R) Pentium(R) CPU  N3540  @ 2.16GHz - 2664
  - Intel(R) Pentium(R) CPU  N3540  @ 2.16GHz - 2664
  - Intel(R) Pentium(R) CPU  N3540  @ 2.16GHz - 2653
  ENDIANNESS: LE
  VERSIONS:
  - ares: 1.18.1
  - brotli: 1.0.9
  - cldr: 39.0
  - icu: 69.1
  - llhttp: 6.0.4
  - modules: 93
  - napi: 8
  - nghttp2: 1.45.1
  - nghttp3: 0.1.0-DEV
  - ngtcp2: 0.1.0-DEV
  - node: 16.13.1
  - openssl: 1.1.1l+quic
  - tz: 2021a
  - unicode: 13.0
  - uv: 1.42.0
  - v8: 9.4.146.24-node.14
  - zlib: 1.2.11

ERROR Summary:

  - broccoliBuilderErrorStack: [undefined]
  - code: ERR_SERVER_NOT_RUNNING
  - codeFrame: [undefined]
  - errorMessage: Server is not running.
  - errorType: [undefined]
  - location:
    - column: [undefined]
    - file: [undefined]
    - line: [undefined]
  - message: Server is not running.
  - name: Error
  - nodeAnnotation: [undefined]
  - nodeName: [undefined]
  - originalErrorMessage: [undefined]
  - stack: Error [ERR_SERVER_NOT_RUNNING]: Server is not running.
    at new NodeError (node:internal/errors:371:5)
    at Server.close (node:net:1628:12)
    at Object.onceWrapper (node:events:509:28)
    at Server.emit (node:events:402:35)
    at Server.emit (node:domain:475:12)
    at emitCloseNT (node:net:1681:8)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

=================================================================================

kenliten avatar Jan 21 '22 15:01 kenliten

@kenliten thanks for the reproduction! are you interested in trying to address the problem?

locks avatar Jan 27 '22 00:01 locks

@kenliten poke!

locks avatar Apr 19 '22 20:04 locks

@locks of course I am, can I?

kenliten avatar Apr 30 '22 23:04 kenliten

@kenliten yeah, let's do it :)

locks avatar May 07 '22 16:05 locks