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.

[vue ssr]normalizeFile get undefined file

See original GitHub issue

Version

2.6.6

Reproduction link

https://codepen.io/lkafai/pen/Erpgze

Steps to reproduce

package.json:

“vue”: “^2.5.22”, “vue-server-renderer”: “^2.6.6”

run command vue-cli-service build

What is expected?

success render

What is actually happening?

TypeError: Cannot read property ‘replace’ of undefined at normalizeFile (/node_modules/_vue-server-renderer@2.6.6@vue-server-renderer/build.dev.js:8998:27)


i open the file vue-ssr-client-manifest.json , and found that some id in modules got -1 index

  "modules": {
    "13323344": [
      13,
      14
    ],
    "0b0ba5ab": [
      3,
      15,
      -1,
      16
    ],

and the -1 index not found any file. so in vue-server-renderer/build.dev.js file,the normalizeFile get undefined , and throw out “Cannot read property ‘replace’ of undefined” i have no idea why there is -1 in modules , and file mapping fail, is this a configure problem? my vue.config.js is writed in codepen , sorry for my poor english

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:4
  • Comments:11

github_iconTop GitHub Comments

6reactions
ediaoscommented, Feb 26, 2019

i got same error when enable sourceMap . in vue-server-render/build.prod.js , getUsedAsyncFiles will throw undefind error.

enable js sourceMap , disable css sourceMap

server render error

enable js and css sourceMap

server render success

disable js and css sourceMap

server render success

4reactions
leekafaicommented, Feb 13, 2019
  css: {
    extract: true,
    sourceMap: false
  }

when i set sourceMap to true ,render success

  css: {
    extract: true,
    sourceMap: true
  }

looks like that no matter where you set in sourceMap,when you create manifest.json, it alway mapping xxx.css.map

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue- Cannot read properties of undefined when dropping file
Uncaught TypeError: Cannot read properties of undefined (reading 'files'). This is the dropbox code (made using tailwind and vue):
Read more >
[Vue 3 & Vite 2] Uncaught (in promise) TypeError: Cannot read ...
After a day of searching, I came close to understand that while 'loading' is true, the function won't return anything so it is...
Read more >
Server-Side Rendering (SSR) - Vue.js
Unlike a fully static SPA that can be deployed on any static file server, a server-rendered app requires an environment where a Node.js...
Read more >
Adding a new todo form: Vue events, methods, and models
In your components folder, create a new file called ToDoForm.vue . ... Next up, we need a way to get the value from...
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