Error: Failed to read source code from `amp-dev.js`
See original GitHub issueWhat version of Next.js are you using?
12.0.5-canary.10-12.0.8
What version of Node.js are you using?
14.17.0
What browser are you using?
Not relevant
What operating system are you using?
Windows
How are you deploying your application?
Not relevant
Describe the Bug
I updated next.js
from v12.0.5-canary.9 to v12.0.5-canary.10 and I got a file not found error of amp-dev.js
.
Expected Behavior
No error.
To Reproduce
yarn init -y
yarn set version canary
yarn add next@canary react react-dom
- Create
pages
folder yarn next
- Read log:
(node:14180) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
error - ./.yarn/__virtual__/next-virtual-553eee263b/0/cache/next-npm-12.0.5-canary.10-1a75536391-cbd811bead.zip/node_modules/next/dist/client/dev/amp-dev.js
Error: Failed to read source code from C:\test-nextjs\.yarn\__virtual__\next-virtual-553eee263b\0\cache\next-npm-12.0.5-canary.10-1a75536391-cbd811bead.zip\node_modules\next\dist\client\dev\amp-dev.js
Caused by:
The system cannot find the path specified. (os error 3)
wait - compiling...
error - ./.yarn/__virtual__/next-virtual-553eee263b/0/cache/next-npm-12.0.5-canary.10-1a75536391-cbd811bead.zip/node_modules/next/dist/client/dev/amp-dev.js
Error: Failed to read source code from C:\test-nextjs\.yarn\__virtual__\next-virtual-553eee263b\0\cache\next-npm-12.0.5-canary.10-1a75536391-cbd811bead.zip\node_modules\next\dist\client\dev\amp-dev.js
Caused by:
The system cannot find the path specified. (os error 3)
wait - compiling...
error - ./.yarn/__virtual__/next-virtual-553eee263b/0/cache/next-npm-12.0.5-canary.10-1a75536391-cbd811bead.zip/node_modules/next/dist/client/dev/amp-dev.js
Error: Failed to read source code from C:\test-nextjs\.yarn\__virtual__\next-virtual-553eee263b\0\cache\next-npm-12.0.5-canary.10-1a75536391-cbd811bead.zip\node_modules\next\dist\client\dev\amp-dev.js
Caused by:
The system cannot find the path specified. (os error 3)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:17 (6 by maintainers)
Top Results From Across the Web
Resolving validation errors - amp.dev
In this section, we'll go through and resolve the AMP validation errors from our AMP ... The file should be empty of any...
Read more >r/nextjs - Reddit
I have a very serious issue right now trying to use Next js. No matter what version I use , any time I...
Read more >Why am I getting amp-script "could not find element" error?
Summary: When I try to use an amp-script tag with a script attribute, it claims not to see the script. Here is the...
Read more >module-not-found - Next.js
A module not found error can occur for many different reasons: The module you're trying to import is not installed in your dependencies;...
Read more >node_modules/next/dist/build/webpack/loaders/css ... - You.com
No matter what version I use, any time I try to run the npm run dev , I get the following error: error...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue will be fixed with #33236
In
next.js
v12.0.5-canary.14, it’s fixed adding innext.config.js
file: