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

Module not found – Error: Can't resolve deleted PAGE #32300

Open
2 tasks done
tujoworker opened this issue Jul 8, 2021 · 10 comments
Open
2 tasks done

Module not found – Error: Can't resolve deleted PAGE #32300

tujoworker opened this issue Jul 8, 2021 · 10 comments
Labels
status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) type: bug An issue or pull request relating to a bug in Gatsby

Comments

@tujoworker
Copy link

tujoworker commented Jul 8, 2021

Preliminary Checks

Description

The bug is related to the File Route API.

The same bug happens with yarn v1, v2 and v3.

Both the latest Gatsby version (v4.15) is effected, but also v2.9 has the same bug, with a different message. More info down below.

A minimal reproduction is given.

Reproduction Link

https://github.com/tujoworker/gatsby-file-route-api-bug

Steps to Reproduce

  1. clone the repo.

  2. run yarn

  3. Start Gatsby by using the start script: yarn start

  4. Duplicate src/pages/folder/. Give the page a new name,
    e.g. src/pages/folder-copy/. Everything is fine.

  5. Delete src/pages/folder-copy/ again.

  6. Enter another file in the repo (within your code editor), e.g.
    src/pages/index.js and hit save.

  7. The error message:

Module not found: Error: Can't resolve './../../../src/pages/folder-copy/index.js' in '/dev/gatsby-filerouteapi-bug/.cache/this_is_virtual_fs_path/$virtual'
```

Screenshot 2022-05-24 at 22 20 30

Expected Result

To delete the stale page(s). No error messages.

Actual Result

Module not found: Error: Can't resolve './../../../src/pages/folder-copy/index.js' in '/dev/gatsby-filerouteapi-bug/.cache/this_is_virtual_fs_path/$virtual'

In v2 the error message is:

gatsby-file-route-api-bug/src/pages/folder-copy/index.js File:
/gatsby-file-route-api-bug/src/pages/folder-copy/index.js

Environment

System:
    OS: macOS 12.0.1
    CPU: (10) x64 Apple M1 Pro
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 14.18.1 - /private/var/folders/6b/1cnty5gx3xv28k5fbrlyq
g140000gn/T/xfs-2547bb34/node
    Yarn: 3.1.0 - /private/var/folders/6b/1cnty5gx3xv28k5fbrlyqg1
40000gn/T/xfs-2547bb34/yarn
    npm: 8.1.0 - ~/.volta/tools/image/npm/8.1.0/bin/npm
  Languages:
    Python: 2.7.18 - /usr/bin/python
  Browsers:
    Chrome: 96.0.4664.45
    Edge: 95.0.1020.53
    Firefox: 88.0
    Safari: 15.1
  npmPackages:
    gatsby: ^4.2.0 => 4.2.0

Config Flags

No response

@tujoworker tujoworker added the type: bug An issue or pull request relating to a bug in Gatsby label Jul 8, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 8, 2021
@njbmartin
Copy link
Contributor

Does the issue still occur when you use gatsby clean?

@tujoworker
Copy link
Author

tujoworker commented Aug 3, 2021

@njbmartin yes. I mean, no. When running build or clean, everything is ok. This issue accrues during development, and it’s also why this is an issue. Renaming a file system page (path) including a folder (directory) name change should work without throwing an error.

@TylerBarnes TylerBarnes added status: needs core review Currently awaiting review from Core team member topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Sep 17, 2021
@github-actions
Copy link

github-actions bot commented Oct 8, 2021

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Oct 8, 2021
@tujoworker
Copy link
Author

Let me check it out on v4 ✨

@github-actions github-actions bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label Oct 8, 2021
@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Oct 28, 2021
@graysonhicks
Copy link
Contributor

@tujoworker Are you still able to reproduce this?

@tujoworker
Copy link
Author

@garethpbk Yes. I updated the reproduction repo to v4.2 – the thing is, once a directory/folder gets deleted , Gatsby (in development) does not recognize that it gets deleted.

@github-actions github-actions bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label Nov 17, 2021
@github-actions
Copy link

github-actions bot commented Dec 8, 2021

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Dec 8, 2021
@graysonhicks graysonhicks added not stale and removed stale? Issue that may be closed soon due to the original author not responding any more. labels Dec 8, 2021
@tyhopp tyhopp removed the status: needs core review Currently awaiting review from Core team member label Jan 6, 2022
@tyhopp tyhopp linked a pull request Jan 6, 2022 that will close this issue
3 tasks
@LekoArts LekoArts removed the not stale label Jan 6, 2022
@tyhopp tyhopp removed their assignment Feb 28, 2022
@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Mar 20, 2022
@tujoworker
Copy link
Author

Hey you, robot – we shouldn’t close this yet.

@github-actions github-actions bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label Mar 21, 2022
@LekoArts LekoArts added the status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. label Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants