gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.28k stars 10.31k forks source link

gatsby develop – gatsby-node.js": ENOENT: no such file or directory, scandir '../packages' #22487

Closed theinfinit closed 4 years ago

theinfinit commented 4 years ago

Description

Following the Instructions got error described below. Tried to use both npm and yarn to install dependencies (on fresh cloned copies of "www" dir). Tried to delete node_modules and yarn.lock and then running again yarn install but no luck here.

Steps to reproduce

  1. Cloned only "www' dir via SVN from Gatsby Repo
  2. Run yarn to install all of the website’s dependencies.
  3. Run npm run develop to preview the site at http://localhost:8000/
  4. Got error

Expected result

Run npm run develop to preview the site at http://localhost:8000/

Actual result

PS C:\Users\konrad\Documents\Workshop_Assets\Web_Development\gatsby\gatsby> npm run develop

> gatsbyjs.org@2.0.0 develop C:\Users\konrad\Documents\Workshop_Assets\Web_Development\gatsby\gatsby
> gatsby develop

success open and validate gatsby-configs - 0.470s

 ERROR

Error in "C:\Users\konrad\Documents\Workshop_Assets\Web_Development\gatsby\gatsby\gatsby-node.js": ENOENT: no such file or directory, scandir '../packages'

  Error: ENOENT: no such file or directory, scandir '../packages'

  - packages.js:12 Object.<anonymous>
    C:/Users/konrad/Documents/Workshop_Assets/Web_Development/gatsby/gatsby/src/utils/node/    packages.js:12:4

  - v8-compile-cache.js:178 Module._compile
    [gatsby]/[v8-compile-cache]/v8-compile-cache.js:178:30

  - loader.js:1167 Object.Module._extensions..js
    internal/modules/cjs/loader.js:1167:10

  - loader.js:996 Module.load
    internal/modules/cjs/loader.js:996:32

  - loader.js:896 Function.Module._load
    internal/modules/cjs/loader.js:896:14

  - loader.js:1036 Module.require
    internal/modules/cjs/loader.js:1036:19

  - v8-compile-cache.js:159 require
    [gatsby]/[v8-compile-cache]/v8-compile-cache.js:159:20

  - gatsby-node.js:13 Object.<anonymous>
    C:/Users/konrad/Documents/Workshop_Assets/Web_Development/gatsby/gatsby/gatsby-node.js:    13:18

  - v8-compile-cache.js:178 Module._compile
    [gatsby]/[v8-compile-cache]/v8-compile-cache.js:178:30

  - loader.js:1167 Object.Module._extensions..js
    internal/modules/cjs/loader.js:1167:10

  - loader.js:996 Module.load
    internal/modules/cjs/loader.js:996:32

  - loader.js:896 Function.Module._load
    internal/modules/cjs/loader.js:896:14

  - loader.js:1036 Module.require
    internal/modules/cjs/loader.js:1036:19

  - v8-compile-cache.js:159 require
    [gatsby]/[v8-compile-cache]/v8-compile-cache.js:159:20

  - resolve-module-exports.js:133 require
    [gatsby]/[gatsby]/src/bootstrap/resolve-module-exports.js:133:26

not finished load plugins - 3.346s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gatsbyjs.org@2.0.0 develop: `gatsby develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gatsbyjs.org@2.0.0 develop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\konrad\AppData\Roaming\npm-cache\_logs\2020-03-23T07_26_47_138Z-debug.log

debug.log

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\konrad\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'develop'
1 verbose cli ]
2 info using npm@6.14.3
3 info using node@v13.11.0
4 verbose run-script [ 'predevelop', 'develop', 'postdevelop' ]
5 info lifecycle gatsbyjs.org@2.0.0~predevelop: gatsbyjs.org@2.0.0
6 info lifecycle gatsbyjs.org@2.0.0~develop: gatsbyjs.org@2.0.0
7 verbose lifecycle gatsbyjs.org@2.0.0~develop: unsafe-perm in lifecycle true
8 verbose lifecycle gatsbyjs.org@2.0.0~develop: PATH: C:\Users\konrad\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\konrad\Documents\Workshop_Assets\Web_Development\gatsby\gatsby\node_modules\.bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\compiler;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\NVIDIA Corporation\Nsight Compute 2019.3.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Git\cmd;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\nodejs\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Yarn\bin\;C:\Users\konrad\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\konrad\AppData\Local\Programs\Python\Python37\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Program Files\MySQL\MySQL Workbench 8.0 CE;C:\Program Files\JetBrains\WebStorm 2019.3.1\bin;C:\Users\konrad\AppData\Roaming\npm;C:\Users\konrad\AppData\Local\Yarn\bin
9 verbose lifecycle gatsbyjs.org@2.0.0~develop: CWD: C:\Users\konrad\Documents\Workshop_Assets\Web_Development\gatsby\gatsby
10 silly lifecycle gatsbyjs.org@2.0.0~develop: Args: [ '/d /s /c', 'gatsby develop' ]
11 silly lifecycle gatsbyjs.org@2.0.0~develop: Returned: code: 1  signal: null
12 info lifecycle gatsbyjs.org@2.0.0~develop: Failed to exec develop script
13 verbose stack Error: gatsbyjs.org@2.0.0 develop: `gatsby develop`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\konrad\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\konrad\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:315:20)
13 verbose stack     at maybeClose (internal/child_process.js:1026:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid gatsbyjs.org@2.0.0
15 verbose cwd C:\Users\konrad\Documents\Workshop_Assets\Web_Development\gatsby\gatsby
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\konrad\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "develop"
18 verbose node v13.11.0
19 verbose npm  v6.14.3
20 error code ELIFECYCLE
21 error errno 1
22 error gatsbyjs.org@2.0.0 develop: `gatsby develop`
22 error Exit status 1
23 error Failed at the gatsbyjs.org@2.0.0 develop script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Environment

  System:
    OS: Windows 10 10.0.17763
    CPU: (8) x64 Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz
  Binaries:
    Node: 13.11.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.14.3 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 3.7.3
  Browsers:
    Edge: 44.17763.1.0
  npmPackages:
    gatsby: ^2.19.45 => 2.20.2 
    gatsby-core-utils: ^1.0.34 => 1.1.0 
    gatsby-design-tokens: ^2.0.3 => 2.0.3 
    gatsby-image: ^2.2.44 => 2.3.0 
    gatsby-plugin-canonical-urls: ^2.1.22 => 2.2.0 
    gatsby-plugin-catch-links: ^2.1.28 => 2.2.0 
    gatsby-plugin-emotion: ^4.1.25 => 4.2.0 
    gatsby-plugin-feed: ^2.3.29 => 2.4.0 
    gatsby-plugin-google-analytics: ^2.1.38 => 2.2.0 
    gatsby-plugin-google-tagmanager: ^2.1.27 => 2.2.0 
    gatsby-plugin-guess-js: ^1.1.32 => 1.2.0 
    gatsby-plugin-layout: ^1.1.24 => 1.2.0 
    gatsby-plugin-mailchimp: ^2.2.3 => 2.2.3 
    gatsby-plugin-manifest: ^2.2.48 => 2.3.1 
    gatsby-plugin-mdx: ^1.0.83 => 1.1.0 
    gatsby-plugin-netlify: ^2.1.35 => 2.2.0 
    gatsby-plugin-netlify-cache: ^0.1.0 => 0.1.0 
    gatsby-plugin-nprogress: ^2.1.21 => 2.2.0 
    gatsby-plugin-offline: ^3.0.41 => 3.1.0 
    gatsby-plugin-react-helmet: ^3.1.24 => 3.2.0 
    gatsby-plugin-sharp: ^2.4.13 => 2.5.1 
    gatsby-plugin-sitemap: ^2.2.30 => 2.3.0 
    gatsby-plugin-theme-ui: ^0.3.0 => 0.3.0 
    gatsby-plugin-twitter: ^2.1.21 => 2.2.0 
    gatsby-plugin-typography: ^2.3.25 => 2.4.0 
    gatsby-remark-autolink-headers: ^2.1.26 => 2.2.0 
    gatsby-remark-code-titles: ^1.1.0 => 1.1.0 
    gatsby-remark-copy-linked-files: ^2.1.40 => 2.2.0 
    gatsby-remark-embedder: ^1.12.0 => 1.16.0 
    gatsby-remark-graphviz: ^1.1.24 => 1.2.0 
    gatsby-remark-http-to-https: ^1.0.2 => 1.0.2 
    gatsby-remark-images: ^3.1.50 => 3.2.0 
    gatsby-remark-normalize-paths: ^1.0.0 => 1.0.0 
    gatsby-remark-prismjs: ^3.3.36 => 3.4.0 
    gatsby-remark-responsive-iframe: ^2.2.34 => 2.3.0 
    gatsby-remark-smartypants: ^2.1.23 => 2.2.0 
    gatsby-source-airtable: ^2.1.0 => 2.1.0 
    gatsby-source-filesystem: ^2.1.56 => 2.2.1 
    gatsby-source-git: ^1.0.2 => 1.0.2 
    gatsby-source-npm-package-search: ^2.1.25 => 2.2.0 
    gatsby-transformer-csv: ^2.1.28 => 2.2.0 
    gatsby-transformer-documentationjs: ^4.1.27 => 4.2.0 
    gatsby-transformer-remark: ^2.6.59 => 2.7.0 
    gatsby-transformer-screenshot: ^2.1.53 => 2.2.0 
    gatsby-transformer-sharp: ^2.3.19 => 2.4.1 
    gatsby-transformer-yaml: ^2.2.27 => 2.3.0 

I will be grateful for your help 🙏😇

theinfinit commented 4 years ago

I downloaded the whole gatsby repo and now it works perfectly. (Thats how it ends when you try to make shortcuts and save time) Sorry for making the noise 😇 Issue resolved.