admin管理员组文章数量:1291293
I downloaded a project from GitHub that me and my friend working on, however when I tried to run
npm run serve
I got this error
error in ./src/main.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in /home/haider/Desktop/L7G/node_modules/@babel/helper-pilation-targets/package.json
at applyExports (internal/modules/cjs/loader.js:524:9)
at resolveExports (internal/modules/cjs/loader.js:541:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:661:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:963:27)
at Function.Module._load (internal/modules/cjs/loader.js:859:27)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/haider/Desktop/L7G/node_modules/@babel/preset-env/lib/debug.js:8:33)
at Module._pile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/haider/Desktop/L7G/node_modules/@babel/preset-env/lib/index.js:11:14)
at Module._pile (internal/modules/cjs/loader.js:1147:30)
@ multi (webpack)-dev-server/client?http://192.168.0.109:8080/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
content of main.js:
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import BootstrapVue from 'bootstrap-vue'
import { ValidationProvider, extend } from 'vee-validate';
// import 'bootstrap/dist/css/bootstrap.css'
// import 'bootstrap-vue/dist/bootstrap-vue.css'
Vue.config.productionTip = false
Vue.prototype.$form = false;
Vue.prototype.$sidebarShow = false;
Vue.use(BootstrapVue)
// Add a rule.
extend('secret', {
validate: value => value === 'example',
message: 'This is not the magic word'
});
// Register it globally
Vueponent('ValidationProvider', ValidationProvider);
// Vueponent('ValidationProvider', ValidationProvider);
new Vue({
store,
router,
render: h => h(App)
}).$mount('#app')
this is my tools that am using: node v13.10.1 npm v6.14.2 @vue/cli 4.2.3 OS Manjaro Linux
This is what I tried to solve the problem: reinstall Node modules reinstall Node.js using a different node.js version - v12.16.1 using different version of vue
Can anyone help??
I downloaded a project from GitHub that me and my friend working on, however when I tried to run
npm run serve
I got this error
error in ./src/main.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in /home/haider/Desktop/L7G/node_modules/@babel/helper-pilation-targets/package.json
at applyExports (internal/modules/cjs/loader.js:524:9)
at resolveExports (internal/modules/cjs/loader.js:541:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:661:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:963:27)
at Function.Module._load (internal/modules/cjs/loader.js:859:27)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/haider/Desktop/L7G/node_modules/@babel/preset-env/lib/debug.js:8:33)
at Module._pile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/haider/Desktop/L7G/node_modules/@babel/preset-env/lib/index.js:11:14)
at Module._pile (internal/modules/cjs/loader.js:1147:30)
@ multi (webpack)-dev-server/client?http://192.168.0.109:8080/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
content of main.js:
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import BootstrapVue from 'bootstrap-vue'
import { ValidationProvider, extend } from 'vee-validate';
// import 'bootstrap/dist/css/bootstrap.css'
// import 'bootstrap-vue/dist/bootstrap-vue.css'
Vue.config.productionTip = false
Vue.prototype.$form = false;
Vue.prototype.$sidebarShow = false;
Vue.use(BootstrapVue)
// Add a rule.
extend('secret', {
validate: value => value === 'example',
message: 'This is not the magic word'
});
// Register it globally
Vue.ponent('ValidationProvider', ValidationProvider);
// Vue.ponent('ValidationProvider', ValidationProvider);
new Vue({
store,
router,
render: h => h(App)
}).$mount('#app')
this is my tools that am using: node v13.10.1 npm v6.14.2 @vue/cli 4.2.3 OS Manjaro Linux
This is what I tried to solve the problem: reinstall Node modules reinstall Node.js using a different node.js version - v12.16.1 using different version of vue
Can anyone help??
Share Improve this question edited Sep 11, 2020 at 8:59 8ctopus 3,2472 gold badges22 silver badges28 bronze badges asked Mar 19, 2020 at 22:43 Computer MindComputer Mind 5412 gold badges6 silver badges12 bronze badges 2-
something not right in
main.js
? – Jaromanda X Commented Mar 19, 2020 at 22:45 - i just updated the question and added the content of main.js – Computer Mind Commented Mar 19, 2020 at 22:50
1 Answer
Reset to default 8i solved the problem by deleting node_modules folder and package-lock.json from the project and then run
npm install
this solved the issue :)
本文标签: javascriptModule build failed (from nodemodulesbabelloaderlibindexjs) Vue JsStack Overflow
版权声明:本文标题:javascript - Module build failed (from .node_modulesbabel-loaderlibindex.js) Vue Js - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741531026a2383754.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论