我正在运行docker文件来创建容器并出现以下错误:
npm WARN saveError ENOENT: no such file or directory, open '/app/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/app/package.json'
npm WARN app No description
npm WARN app No repository field.
npm WARN app No README data
npm WARN app No license field.
Docker文件:
FROM node:alpine
WORKDIR '/app'
COPY package.jason .
RUN npm install
COPY . .
CMD ["npm", "start"]
Package.jason在项目文件夹中可用。所以我的项目文件夹看起来像
../
Dockerfile
package.jason
index.js
谢谢。
答案 0 :(得分:1)
我看到该文件名为package.jason :)。您可以重命名吗?