Closed areyouse7en closed 6 years ago
@areyouse7en Thank you for this.
I published the 'parcel-plugin-vue@1.1.1'.
⏳ Building...
Server running at http://localhost:1234
🚨 Cannot find module 'parcel-bundler/src/assets/JSAsset'
Error: Cannot find module 'parcel-bundler/src/packagers/JSPackager.js'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:476:23)
at Module.require (module.js:568:17)
at require (C:\Users\seven\AppData\Local\Yarn\config\global\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
at Object.<anonymous> (H:\practice\parcel-demo\node_modules\parcel-plugin-vue\src\VueAsset.js:3:17)
at Module._compile (C:\Users\seven\AppData\Local\Yarn\config\global\node_modules\v8-compile-cache\v8-compile-cache.js:178:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
Just use your example code. Anything else should I do?
@areyouse7en Are you installed the parcel-bundler?
You Should install parcel-bundler yourself
The plugins for parcel-bundler need a same version of parcel-bundler at runtime.
我贴一下我的代码
现在运行以后报错
你直接给一个 repo 地址好了,我自己跑跑看 @areyouse7en
@areyouse7en 可能是 cache 机制有点问题,运行的时候使用下面这个命令是正常的
rm -rf dist && rm -rf .cache && parcel index.html
全局 parcel 可能和项目内 parcel 也可能会冲突,推荐在 package.json
添加 scripts
"scripts": {
"dev": "rm -rf .cache && rm -rf dist && parcel index.html"
},
to run
npm run dev
instead ofrun rm -rf .cache && rm -rf dist && parcel index.html
from https://github.com/lc60005457/parcel-plugin-vue/issues/1
另外需要注意一个问题 https://github.com/parcel-bundler/parcel/issues/315
确实是缓存的问题。
write app.vue like this
then got this error