question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create failing with ENOENT: no such file or directory

See original GitHub issue

I’m trying to install on Windows, and whether I use cygwin or the native shell I run into this problem trying to create the service:

Jim-PC17 495 ~/workspace/jetsam$ serverless create -u https://github.com/adieuadieu/serverless-chrome/tree/master/examples/serverless-framework/ aws
Serverless: Generating boilerplate...
Serverless: Downloading and installing "examples\serverless-framework\aws"...

  Serverless Error ---------------------------------------

  Error: ENOENT: no such file or directory, link 'C:\Users\Jim\workspace\dist' -> 'C:\cygwin64\tmp\serverless-chrome\packages\lambda\integration-test\dist'

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Forums:        forum.serverless.com
     Chat:          gitter.im/serverless/serverless

  Your Environment Information -----------------------------
     OS:                     win32
     Node Version:           8.9.3
     Serverless Version:     1.24.1

I’m new to this stack, and I’m not sure if that cryptic error message means it can’t make a symlink or can’t find a symlink, or if it’s suggesting I make one. What I have figured out:

  1. C:\Users\Jim\workspace\dist doesn’t exist (and probably shouldn’t be created, as it’s outside the directory I’m trying to install into).
  2. C:\cygwin64\tmp\serverless-chrome\packages\lambda\integration-test does exist but has no dist subdir.
  3. I see in github dist is supposed to be a symlink that points up the tree, but I don’t see its target in github. Maybe it’s supposed to be created during the install? I haven’t figured out how to turn on enough logging to follow the install process.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:12
  • Comments:16

github_iconTop GitHub Comments

4reactions
ashbeatscommented, May 29, 2018

Any updates on this?

4reactions
jamestharpecommented, Jan 1, 2018

Any workarounds for this? I’ve tried a few things, including:

Run in GitBash as administrator Gives same error as reported by @jkellyinsf

Run in PowerShell as administrator Gives same error as reported by @jkellyinsf

Clone the repo (git@github.com:adieuadieu/serverless-chrome.git) then invoke local version-info as administrator

I had to install chrome-launcher - shouldn’t this be a dev dependency by default?

In any case, once chrome-launcher is installed, I get the following error:

ENOTEMPTY: directory not empty, rmdir ‘~/code/serverless-chrome/examples/serverless-framework/aws/.build/.webpack’

I manually removed the .webpack directory and retried invoking the service locally, but got the same error. Here’s the full output:

$ serverless invoke local -f version-info
Serverless: Injecting Headless Chrome...
Serverless: Bundling with Webpack...
Time: 1848ms
                      Asset    Size  Chunks                    Chunk Names
    src/handlers/version.js  579 kB       0  [emitted]  [big]  src/handlers/version
src/handlers/version.js.map  713 kB       0  [emitted]         src/handlers/version
   [0] external "fs" 42 bytes {0} [not cacheable]
   [1] external "path" 42 bytes {0} [not cacheable]
   [2] ./node_modules/@serverless-chrome/lambda/dist/bundle.es.js 11.5 kB {0} [built]
   [5] external "child_process" 42 bytes {0} [not cacheable]
  [10] external "net" 42 bytes {0} [not cacheable]
  [35] ./.build/src/handlers/version.js 651 bytes {0} [built]
  [36] ./node_modules/chrome-launcher/index.js 412 bytes {0} [optional] [built]
  [37] ./node_modules/chrome-launcher/chrome-launcher.js 25.5 kB {0} [built]
  [47] ./node_modules/chrome-launcher/chrome-finder.js 17.8 kB {0} [built]
  [55] ./node_modules/chrome-launcher/random-port.js 1.92 kB {0} [built]
  [56] ./node_modules/chrome-launcher/flags.js 2.09 kB {0} [built]
  [57] ./.build/src/handlers/1k819a6djhn___version.js 651 bytes {0} [built]
  [58] ./.build/src/handlers/vm9pl8nfv3l___version.js 651 bytes {0} [built]
  [59] ./.build/src/handlers/ueyt7nxxsun___version.js 651 bytes {0} [built]
  [60] ./.build/src/handlers/ojwh36dqtcj___version.js 651 bytes {0} [built]
    + 62 hidden modules

WARNING in ./node_modules/ws/lib/BufferUtil.js
Module not found: Error: Can't resolve 'bufferutil' in '~/code/serverless-chrome/examples/serverless-framework/aws/node_modules/ws/lib'
 @ ./node_modules/ws/lib/BufferUtil.js 35:21-42
 @ ./node_modules/ws/lib/Receiver.js
 @ ./node_modules/ws/index.js
 @ ./node_modules/chrome-remote-interface/lib/chrome.js
 @ ./node_modules/chrome-remote-interface/index.js
 @ ./.build/src/chrome/version.js
 @ ./.build/src/handlers/6kk7p2zprlubqnxa33vkc07ldi___version.js
 @ ./.build/src/handlers/r5h7afteshk___version.js
 @ ./.build/src/handlers/ojwh36dqtcj___version.js
 @ ./.build/src/handlers/ueyt7nxxsun___version.js
 @ ./.build/src/handlers/vm9pl8nfv3l___version.js
 @ ./.build/src/handlers/1k819a6djhn___version.js
 @ ./.build/src/handlers/version.js

WARNING in ./node_modules/ws/lib/Validation.js
Module not found: Error: Can't resolve 'utf-8-validate' in '~/code/serverless-chrome/examples/serverless-framework/aws/node_modules/ws/lib'
 @ ./node_modules/ws/lib/Validation.js 10:22-47
 @ ./node_modules/ws/lib/Receiver.js
 @ ./node_modules/ws/index.js
 @ ./node_modules/chrome-remote-interface/lib/chrome.js
 @ ./node_modules/chrome-remote-interface/index.js
 @ ./.build/src/chrome/version.js
 @ ./.build/src/handlers/6kk7p2zprlubqnxa33vkc07ldi___version.js
 @ ./.build/src/handlers/r5h7afteshk___version.js
 @ ./.build/src/handlers/ojwh36dqtcj___version.js
 @ ./.build/src/handlers/ueyt7nxxsun___version.js
 @ ./.build/src/handlers/vm9pl8nfv3l___version.js
 @ ./.build/src/handlers/1k819a6djhn___version.js
 @ ./.build/src/handlers/version.js
@serverless-chrome/lambda Spawning headless shell

  Error --------------------------------------------------

  ENOTEMPTY: directory not empty, rmdir '~/code/serverless-chrome/examples/serverless-framework/aws/.build/.webpack'

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Forums:        forum.serverless.com
     Chat:          gitter.im/serverless/serverless

  Your Environment Information -----------------------------
     OS:                     win32
     Node Version:           9.3.0
     Serverless Version:     1.25.0

My next step will be to try to rebuild the version-info function from scratch to see if I can spot any issues or get it working.

Any other suggestions for diagnosing/fixing/working-around this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

yarn create failing with ENOENT: no such file or directory ...
Installed Yarn with both apt and npm -g and getting the same issue. I haven't tried with this with any creates other than...
Read more >
ENOENT: no such file or directory when running npm ...
Open a terminal in your pc's root and run this command: killall node · Before restart the new metro bundler please reinstall the...
Read more >
Package Manager: ENOENT: no such file or directory, mkdir
Description* Attempting to create or open a project when there is a quote in the project path/name or in the UPM cache path...
Read more >
Error: ENOENT: no such file or directory, stat '/opt/ ...
I have a next error: Error: ENOENT: no such file or directory, stat '/opt/render/project/src/client/build/index.html My code here: if ...
Read more >
How To Fix the “Enoent” Error?
The “enoent” can appear because of some missing files or usage of the relative path that can be solved by creating an expected...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found