Error: Cannot find module './assets.json'
See original GitHub issueI just checked out this repo tonight, ran npm install
, then npm start
.
↪ npm start
> @ start /src/test-app
> babel-node tools/run start
[21:21:48] Starting 'start'...
[21:21:48] Starting 'clean'...
[21:21:48] Finished 'clean' after 22 ms
[21:21:48] Starting ''...
build/package.json
[21:21:48] Finished '' after 164 ms
Error: Cannot find module './assets.json'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.module.exports.Object.defineProperty.value (/src/test-app/build/webpack:/external "./assets.json":1:1)
at __webpack_require__ (/src/test-app/build/webpack:/webpack/bootstrap aa2d604e4e09d8ff8a8e:19:1)
at Object.<anonymous> (/src/test-app/build/webpack:/src/server.js:9:37)
at __webpack_require__ (/src/test-app/build/webpack:/webpack/bootstrap aa2d604e4e09d8ff8a8e:19:1)
at module.exports._this2 (/src/test-app/build/webpack:/webpack/bootstrap aa2d604e4e09d8ff8a8e:39:1)
at Object.<anonymous> (/src/test-app/build/webpack:/webpack/bootstrap aa2d604e4e09d8ff8a8e:39:1)
webpack built 333c850d705c8c769ddd in 6474ms
Child
Time: 6474ms
Asset Size Chunks Chunk Names
main.js?333c850d705c8c769ddd 3.13 MB 0 [emitted] main
Child
Time: 5748ms
Asset Size Chunks Chunk Names
server.js 194 kB 0 [emitted] main
server.js.map 173 kB 0 [emitted] main
webpack: bundle is now VALID.
There were a couple errors for the npm install
command, and I’m not sure if they’re related.
npm WARN engine jest-cli@0.8.2: wanted: {"node":">= 4"} (current: {"node":"0.12.7","npm":"2.12.1"})
npm WARN prefer global babel@5.8.34 should be installed with -g
Here’s what’s in the build directory.
↪ ls build
assets.json content package.json public server.js server.js.map
Issue Analytics
- State:
- Created 8 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
4 Answers - 4 - Stack Overflow
Create file called json-typings.d.ts in src/app folder. and typing file as follows: declare module "*.json" { const value: any; ...
Read more >Solved: "Cannot find module 'x.json'" TypeScript Error
When trying to import a JSON file in your TypeScript project, you may see the following error: Cannot find module 'my-json-file.json'.
Read more >Copy this in your tsconfig.json file , inside compilerOptions
[Solved]-Cannot find module '../assets/json/example.json'-angular.js ... Try to solve it this way. Its work for me. ... Then you can import Json files just...
Read more >cannot find module or its corresponding type declarations file
Cannot find module 'react' or its corresponding type declarations. The project compiles and runs successfully but the errors are still there.
Read more >resolvejsonmodule' to import module with json extension ...
I got this following error "cannot find module consider using '--resolvejsonmodule' to import module with json extension angular" while ...
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
still getting this error too
This is not issue in our codebase.