npm run dev undefined:1 issue on debian

2019-06-06 07:14发布

undefined:1

SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Manifest.read (/var/www/html/app/node_modules/laravel-mix/src/Manife                                                                                        st.js:132:21)
at new Manifest (/var/www/html/app/node_modules/laravel-mix/src/Manifes                                                                                        t.js:14:43)
at Mix.initialize (/var/www/html/app/node_modules/laravel-mix/src/Mix.j                                                                                        s:49:25)
at Object.<anonymous> (/var/www/html/app/node_modules/laravel-mix/setup                                                                                        /webpack.config.js:18:5)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at requireConfig (/var/www/html/app/node_modules/webpack/bin/convert-ar                                                                                        gv.js:96:18)
at /var/www/html/app/node_modules/webpack/bin/convert-argv.js:109:17
at Array.forEach (native)
at module.exports (/var/www/html/app/node_modules/webpack/bin/convert-a                                                                                        rgv.js:107:15)

I'm using webpack with laravel, but i keep getting this error,I dont have any idea where to look for this issue or what could be the problem.

Any tips?

Thanks!

标签: node.js npm
2条回答
Anthone
2楼-- · 2019-06-06 08:00

The Error is from JSON parser. Generally speaking, it is caused by pass wrong parameter to JSON.parse. Double check if you are trying to parse some improper string to JSON. I used to have this error when I passed a normal string to JSON parser.

查看更多
一纸荒年 Trace。
3楼-- · 2019-06-06 08:17

Try deleting the mix-manifest.json file from /public

From https://github.com/JeffreyWay/laravel-mix/issues/772

查看更多
登录 后发表回答