Question

Building nuxt nodejs app

Posted July 15, 2021 325 views
Node.js

I am trying to deploy my app but I get the following error:

[2021-07-15 03:29:48] => Initializing build
[2021-07-15 03:29:48] => Retrieving source code to /workspace
[2021-07-15 03:29:48] => Selecting branch "master"
[2021-07-15 03:29:49] => Checking out commit "0231d98ea180fd1152371adc81f9a78769592c68"
[2021-07-15 03:29:50] => Got source_dir: /code
[2021-07-15 03:29:50] => Using workspace root /workspace/code
[2021-07-15 03:29:50] 
[2021-07-15 03:29:50] => Building app using buildpacks
[2021-07-15 03:29:50] => Injecting app environment variables:
[2021-07-15 03:29:50]      NOMICS_API_KEY API_URL FACEBOOK_CLIENT_ID
[2021-07-15 03:29:50] => Configuring custom build command to be run at the end of the build:
[2021-07-15 03:29:50]      yarn build
[2021-07-15 03:29:50] => Running buildpack detection
[2021-07-15 03:29:50] 
[2021-07-15 03:29:51] heroku/nodejs-engine  0.5.0
[2021-07-15 03:29:51] digitalocean/node     0.3.3
[2021-07-15 03:29:51] digitalocean/procfile 0.0.3
[2021-07-15 03:29:51] digitalocean/custom   0.1.0
[2021-07-15 03:29:51] 
[2021-07-15 03:29:51] For documentation on the buildpacks used to build your app, please see:
[2021-07-15 03:29:51]    Node.js: https://do.co/apps-buildpack-node
[2021-07-15 03:29:51] 
[2021-07-15 03:29:51] => Building app
[2021-07-15 03:29:51] 
[2021-07-15 03:29:51] ---> Node.js Buildpack
[2021-07-15 03:29:51] ---> Installing toolbox
[2021-07-15 03:29:51] ---> - jq
[2021-07-15 03:29:51] ---> - yj
[2021-07-15 03:29:51] ---> Getting Node version
[2021-07-15 03:29:52] ---> Resolving Node version
[2021-07-15 03:29:52] ---> Downloading and extracting Node v16.5.0
[2021-07-15 03:29:55] ---> Parsing package.json
[2021-07-15 03:29:55] ---> Installing yarn@1.22.10
[2021-07-15 03:29:56] ---> No file to start server
[2021-07-15 03:29:56] ---> either use 'docker run' to start container or add index.js or server.js
[2021-07-15 03:29:56] Installing node_modules using yarn (from yarn.lock)
[2021-07-15 03:29:56] Running yarn install
[2021-07-15 03:29:56] 
[2021-07-15 03:29:57] yarn install v1.22.10
[2021-07-15 03:29:57] [1/5] Validating package.json...
[2021-07-15 03:29:57] [2/5] Resolving packages...
[2021-07-15 03:29:57] [3/5] Fetching packages...
[2021-07-15 03:30:54] info fsevents@2.3.2: The platform "linux" is incompatible with this module.
[2021-07-15 03:30:54] info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[2021-07-15 03:30:54] info fsevents@1.2.13: The platform "linux" is incompatible with this module.
[2021-07-15 03:30:54] info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[2021-07-15 03:30:54] [4/5] Linking dependencies...
[2021-07-15 03:30:54] warning " > @nuxtjs/auth-next@5.0.0-1624817847.21691f1" has unmet peer dependency "vue@*".
[2021-07-15 03:30:54] warning "@nuxtjs/markdownit > raw-loader@4.0.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
[2021-07-15 03:30:54] warning " > @saeris/vue-spinners@1.0.8" has unmet peer dependency "emotion@9.2.6".
[2021-07-15 03:30:54] warning " > @saeris/vue-spinners@1.0.8" has unmet peer dependency "vue@^2.5.2".
[2021-07-15 03:30:54] warning " > @saeris/vue-spinners@1.0.8" has unmet peer dependency "vue-emotion@0.4.2".
[2021-07-15 03:30:54] warning " > element-ui@2.15.2" has unmet peer dependency "vue@^2.5.17".
[2021-07-15 03:30:54] warning " > markdown-it-attrs@4.0.0" has unmet peer dependency "markdown-it@>= 9.0.0 < 13.0.0".
[2021-07-15 03:30:54] warning "nuxt > @nuxt/components@2.1.8" has unmet peer dependency "consola@*".
[2021-07-15 03:30:54] warning " > sass-loader@10.2.0" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
[2021-07-15 03:30:54] warning " > vue-infinite-loading@2.4.5" has unmet peer dependency "vue@^2.6.10".
[2021-07-15 03:30:54] warning " > vue-masonry-wall@0.3.2" has unmet peer dependency "lodash@^4.17.15".
[2021-07-15 03:30:54] warning " > vue-masonry-wall@0.3.2" has unmet peer dependency "vue@^2.6.10".
<^>[2021-07-15 03:30:56] error An unexpected error occurred: "EACCES: permission denied, mkdir '/node_modules'".
[2021-07-15 03:30:56] info If you think this is a bug, please open a bug report with the information provided in "/workspace/code/yarn-error.log".
[2021-07-15 03:30:56] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[2021-07-15 03:30:56] 
[2021-07-15 03:30:56] unable to invoke layer creator
[2021-07-15 03:30:56] installing node_modules: exit status 1
[2021-07-15 03:30:56] ERROR: failed to build: exit status 1
[2021-07-15 03:30:58] 
[2021-07-15 03:30:58] For documentation on the buildpacks used to build your app, please see:
[2021-07-15 03:30:58]    Node.js: https://do.co/apps-buildpack-node
[2021-07-15 03:30:58] 
[2021-07-15 03:30:58]  ! Build failed (145)<^>
[]

Why this is happening?

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hey there!

Are you specifying a version of Yarn or NPM to use in your package.json file? This issue can occur when using versions of NPM lower then 6. I’d recommend specifying the version of node, yarn or npm you wish to use in your package.json file.

Hope it helps!
Nate