
"scripts": { "dev": "cross-env ENV=company NODE_ENV=development LOCATION=pre nodemon server/index.js --watch server", "dev_online": "cross-env ENV=online NODE_ENV=development nodemon server/index.js }, "dependencies": { "@elk/analytics": "^2.2.3", "@nuxtjs/axios": "^5.11.0", "@nuxtjs/style-resources": "^1.0.0", "@sentry/tracing": "^7.98.0", "@sentry/vue": "^7.98.0", "@utils/elk-common": "^1.0.0", "access-log": "^0.4.1", "clipboard": "^2.0.11", "cookie-universal-nuxt": "^2.1.3", "cross-env": "^5.2.0", "express": "^4.16.4", "js-base64": "^2.6.3", "node-libcurl": "^3.0.0", "nuxt": "^2.12.0", "nuxt-start": "^2.12.2", "velocity-animate": "^1.5.2", "vue-i18n": "^8.15.3", "vue-lazyload": "^1.3.3", "vue-recaptcha": "^1.3.0" } version: '3' services: my_xxxx_node_14: container_name: my_xxxx_node_14 image: node:14 ports: - "3014:3000" volumes: - ../:/app working_dir: /app command: sh -c "npm install -g nodemon && npm run dev" networks: - frontend networks: frontend: external: true // process.browser = false ,确定代码是在服务端执行的 const host = !process.browser ? 'http://127.0.0.1:3000' : `${ctx.protocol}//${ctx.host}` const request_url = `${host}${langDir}/${ctx.store.state.locale}/${file}.json` ctx.$axios.get(request_url) docker compose up -d 启动项目后,http://127.0.0.1:3014 项目可以正常访问
请问这是什么原因?
安装这个包之后,项目启动访问 http://localhost:3014/blog/ 会报错,npm 卸载重装,删除容器重启都没用,
in ./node_modules/node-libcurl/lib/binding/node_libcurl.node 1:2 Module parse failed: Unexpected character '' (1:2) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders (Source code omitted for this binary file)